c0f 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ {"Make": "Honda", "Model": "Civic", "Year": "2009", "Trim": "Hybrid", "Dynamic": "true", "Common": [ { "ID": "166" },{ "ID": "158" },{ "ID": "161" },{ "ID": "191" },{ "ID": "18E" },{ "ID": "133" },{ "ID": "136" },{ "ID": "13A" },{ "ID": "13F" },{ "ID": "164" },{ "ID": "17C" },{ "ID": "183" },{ "ID": "143" },{ "ID": "095" } ], "MainID": "143", "MainInterval": "0.009998683195847732"}
2
+
Binary file
@@ -0,0 +1,32 @@
1
+ require "c0f/can_packet"
2
+ require 'test/unit'
3
+
4
+ class TestCanPacket < Test::Unit::TestCase
5
+ # Output from logs
6
+ def test_parse_log
7
+ pkt = C0f::CANPacket.new
8
+ assert_equal true, pkt.parse("(1398128223.815980) can0 13A#0000000000000028")
9
+ assert_equal 1398128223.815980, pkt.sent
10
+ assert_equal "13A", pkt.id
11
+ assert_equal 8, pkt.dlc
12
+ assert_equal "28".hex, pkt.data[7]
13
+ end
14
+
15
+ # Direct output from candump
16
+ def test_parse_candump
17
+ pkt = C0f::CANPacket.new
18
+ assert_equal true, pkt.parse("(1421010803.828887) can0 128 [3] A0 00 03")
19
+ assert_equal 1421010803.828887, pkt.sent
20
+ assert_equal "128", pkt.id
21
+ assert_equal 3, pkt.dlc
22
+ assert_equal "03".hex, pkt.data[2]
23
+ end
24
+
25
+ # test the 3 known interfaces can0, vcan0, slcan0
26
+ def test_interfaces
27
+ pkt = C0f::CANPacket.new
28
+ assert_equal true, pkt.parse("(1398128223.815980) can0 13A#0000000000000028")
29
+ assert_equal true, pkt.parse("(1398128223.815980) vcan0 13A#0000000000000028")
30
+ assert_equal true, pkt.parse("(1398128223.815980) slcan0 13A#0000000000000028")
31
+ end
32
+ end
metadata ADDED
@@ -0,0 +1,198 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: c0f
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Craig Smith
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rdoc
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: aruba
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: methadone
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.8'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.8'
97
+ - !ruby/object:Gem::Dependency
98
+ name: formatador
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: sqlite3
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: json
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: c0f - CAN of Fingers. CAN Bus fingerprinting to passively determine
140
+ make/model of vehicle
141
+ email:
142
+ - craig@theialabs.com
143
+ executables:
144
+ - c0f
145
+ extensions: []
146
+ extra_rdoc_files: []
147
+ files:
148
+ - Gemfile
149
+ - LICENSE
150
+ - README.rdoc
151
+ - Rakefile
152
+ - bin/c0f
153
+ - c0f.gemspec
154
+ - features/c0f.feature
155
+ - features/step_definitions/c0f_steps.rb
156
+ - features/support/env.rb
157
+ - lib/c0f.rb
158
+ - lib/c0f/can_fingerprint.rb
159
+ - lib/c0f/can_fingerprint_db.rb
160
+ - lib/c0f/can_packet.rb
161
+ - lib/c0f/can_packet_stat.rb
162
+ - lib/c0f/version.rb
163
+ - test/sample-can.log
164
+ - test/sample-fp.json
165
+ - test/sample.db
166
+ - test/tc_can_packet.rb
167
+ homepage: http://opengarages.orb
168
+ licenses:
169
+ - GPLv3
170
+ metadata: {}
171
+ post_install_message:
172
+ rdoc_options: []
173
+ require_paths:
174
+ - lib
175
+ required_ruby_version: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ required_rubygems_version: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
185
+ requirements: []
186
+ rubyforge_project:
187
+ rubygems_version: 2.4.3
188
+ signing_key:
189
+ specification_version: 4
190
+ summary: c0f - CAN Bus Fingerprinting
191
+ test_files:
192
+ - features/c0f.feature
193
+ - features/step_definitions/c0f_steps.rb
194
+ - features/support/env.rb
195
+ - test/sample-can.log
196
+ - test/sample-fp.json
197
+ - test/sample.db
198
+ - test/tc_can_packet.rb