Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.23k stars 571 forks source link

Logging in VERBOSE mode #213

Closed Ari0ner closed 5 years ago

Ari0ner commented 5 years ago

Hi! Is there any way to convert hexidecimal data packets in verbose mode to readable presentation?

rom1v commented 5 years ago
echo 414243 | xxd -r -p
echo 414243 | xxd -r -p | hd
Ari0ner commented 5 years ago

Thank you, it helped, but text is mixed:

Hs:vdyr Cneto:ke-lv CceCnrl a-g= UgaeIscr-euss Ue-gn:Mzla50(iu;Adod9 K-0)ApeeKt573 KTL ieGco hoe7..7013Mbl aai573 Acp:tx/tlapiainxtlxlapiainxlq09iaewb,mg/pg**q08apiainsge-xhnevb Acp-noig zp elt Acp-agae uR,uq09e-Sq08e;=. I-oeMth /d-515015" fMdfe-ic:Te 6Sp21

Connection was to vidgy.ru, it should be in the first line as i assume, but half the text is missing. Am i doing something wrong?

rom1v commented 5 years ago

Please provide the hexadecimal.

Ari0ner commented 5 years ago

HexIOnly.txt This file contents only hex data

rom1v commented 5 years ago

Oh, printing binary packets in the Java version has been broken by 9a184b9428f443a01f6194c6c7f683f9c70b05b8.

As a result, i was incremented twice:

https://github.com/Genymobile/gnirehtet/blob/2bf8a3cfbe2168031897b8f917c088fe6d47710c/relay-java/src/main/java/com/genymobile/gnirehtet/relay/Binary.java#L30 https://github.com/Genymobile/gnirehtet/blob/2bf8a3cfbe2168031897b8f917c088fe6d47710c/relay-java/src/main/java/com/genymobile/gnirehtet/relay/Binary.java#L37

Fixed by 0fc3de6a26417e1f991432dbf047812b943dc856.

Ari0ner commented 5 years ago

Thank you for response! Now it works as should.