pwnieexpress / blue_hydra

Blue Hydra
Other
837 stars 109 forks source link

Parse hex #121

Closed ZeroChaos- closed 6 years ago

ZeroChaos- commented 6 years ago

Now, instead of parsing predominately text, we are parsing hex. This includes spec to check the bluez source code to ensure that the hex we are parsing doesn't change from known/expected values.

root@pwnix-d0509979ec6a:/opt/pwnix/blue_hydra/spec# rm -rf /usr/src/bluez/ root@pwnix-d0509979ec6a:/opt/pwnix/blue_hydra/spec# rspec hex_spec.rb ......................

Finished in 0.01166 seconds (files took 1.01 seconds to load) 22 examples, 0 failures

root@pwnix-d0509979ec6a:/opt/pwnix/blue_hydra/spec# rm -rf /usr/src/bluez/ root@pwnix-d0509979ec6a:/opt/pwnix/blue_hydra/spec# rspec -f d hex_spec.rb

Hex needed for btmon handler including Bluetooth monitor ver including { 0x0f, "Command Status", including { 0x13, "Number of Completed Packets", including { 0x0e, "Command Complete", including "New Index", label, details); including "Delete Index", label, NULL); including "Open Index", label, NULL); including "Index Info", label, details); including "Note", message, NULL); including { 0x03, "Connect Complete", including { 0x07, "Remote Name Req Complete", chunker including { 0x03, "Connect Complete", including { 0x12, "Role Change" including { 0x2f, "Extended Inquiry Result" including { 0x22, "Inquiry Result with RSSI", including { 0x07, "Remote Name Req Complete" including { 0x3d, "Remote Host Supported Features", including { 0x04, "Connect Request", including { 0x0e, "Command Complete", including { 0x3e, "LE Meta Event", including { 0, "LE Connection Complete" }, including { 1, "LE Advertising Report" },

Finished in 0.01061 seconds (files took 1.04 seconds to load) 22 examples, 0 failures

dallaswinger commented 6 years ago

lgtm, ty for the tests. lets get testing this on sensors