Python Forum
Decoding Hex / understanding Code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Decoding Hex / understanding Code
#4
@nilamo

Thats right, i posted a link to the repo where you'll find the complete code.

@wavic

So it decodes a hex file and reads binary?

The result i get from the file i read though the script is something like:

nick - might - points
YVOVY - 292920 - 2940
schrubbi - 338465 - 3750

and so on...
As far as i understand the coding, i thought there is something calculated, or?
might = (struct.unpack("<I", codecs.decode(data[4:12], "hex"))[0])/1000
maybe you can help me break this line up in pieces like:

struct.unpack -> decodes hax
- <I -> i dont know :)
- codecs.decode(data[4:12], -> what is about data 4:12 are these position in the hex?
- etc...

EDIT: I also tried to view the file with a hex editor and find the final output as clear-text. No chance :)

Thank you guys for helping me here.
Regards,
Axel
Reply


Messages In This Thread
Decoding Hex / understanding Code - by NoWay - Mar-19-2018, 06:11 PM
RE: Decoding Hex / understanding Code - by nilamo - Mar-19-2018, 08:52 PM
RE: Decoding Hex / understanding Code - by wavic - Mar-19-2018, 09:01 PM
RE: Decoding Hex / understanding Code - by NoWay - Mar-19-2018, 10:59 PM
RE: Decoding Hex / understanding Code - by NoWay - Mar-20-2018, 02:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Decoding lat/long in file name johnmcd 4 457 Mar-22-2024, 11:51 AM
Last Post: johnmcd
  Enigma Decoding Problem krisarmstrong 4 851 Dec-14-2023, 10:42 AM
Last Post: Larz60+
  Code understanding: Need help in understanding dictionary code jt123 0 499 Jul-09-2023, 01:13 PM
Last Post: jt123
  New to python/coding Need help on Understanding why this code isn't working. Thanks! mat3372 8 1,864 May-09-2023, 08:47 AM
Last Post: buran
  json decoding error deneme2 10 3,947 Mar-22-2023, 10:44 PM
Last Post: deanhystad
  Understanding a piece of code Michael1 4 1,486 Jan-20-2022, 07:14 PM
Last Post: Michael1
  flask app decoding problem mesbah 0 2,404 Aug-01-2021, 08:32 PM
Last Post: mesbah
  Decoding a serial stream AKGentile1963 7 8,874 Mar-20-2021, 08:07 PM
Last Post: deanhystad
  Beginner: I need help understanding few lines of a code. hop_090 1 1,731 Sep-07-2020, 04:02 PM
Last Post: Larz60+
  Extracting Rows From Data Frame and Understanding The Code JoeDainton123 0 1,467 Aug-03-2020, 04:08 PM
Last Post: JoeDainton123

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020