Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Manipulating Binary Data
#1
Hi,

Dealing with some python at my work and having a little trouble writing a good script.

I have a txt file with a bunch of Hexadecimal data (1000's lines), e.g 2 frames shown below


AA08430022 AA08410234



The first 2 bytes of each 'frame' is the timestamp signal (in this case AA08). The rest of the frame (3 bytes) is the actual data.

I need to separate the data so that the timestamps can be in their own list and the data can be separated into 3 bins. This data needs to all be linked together at the end so that it is all sequential.

I need to get to a situation where this data is in a csv file in the following way:

          COL                            BIN1                BIN2                    BIN3
timestamp(frame1)              data(frame1)      data(frame1)        data(frame1)
timestamp(frame2)              data(frame2)      data(frame2)        data(frame2)


I'm not sure how to go about doing this. 
Not expecting any solution but advice what direction to go in would be great as I'm at a dead end.

Thanks











my code here
Reply


Messages In This Thread
Manipulating Binary Data - by arsenal88 - Apr-20-2017, 11:02 PM
RE: Manipulating Binary Data - by ichabod801 - Apr-21-2017, 01:05 AM
RE: Manipulating Binary Data - by arsenal88 - Apr-21-2017, 09:16 AM
RE: Manipulating Binary Data - by volcano63 - Apr-21-2017, 09:21 AM
RE: Manipulating Binary Data - by arsenal88 - Apr-21-2017, 11:24 AM
RE: Manipulating Binary Data - by wavic - Apr-21-2017, 01:01 PM
RE: Manipulating Binary Data - by ichabod801 - Apr-21-2017, 09:08 PM
RE: Manipulating Binary Data - by arsenal88 - Apr-22-2017, 07:46 PM
RE: Manipulating Binary Data - by snippsat - Apr-22-2017, 08:42 PM
RE: Manipulating Binary Data - by arsenal88 - Apr-25-2017, 12:29 PM
RE: Manipulating Binary Data - by snippsat - Apr-25-2017, 02:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to convert binary data into text? ZYSIA 3 2,671 Jul-16-2021, 04:18 PM
Last Post: deanhystad
  Binary data to Image convert Nuwan16 1 5,728 Aug-24-2020, 06:03 AM
Last Post: millpond
  Manipulating data from a CSV EvanS1 5 2,752 Jun-12-2020, 05:59 PM
Last Post: perfringo
  manipulating two lists rancans 8 3,266 Apr-16-2020, 06:00 PM
Last Post: deanhystad
  Manipulating index value, what is wrong with this code? Emun 1 1,781 Feb-05-2020, 07:18 AM
Last Post: perfringo
  Manipulating the filename of an output script mckinneycm 4 11,931 Jan-15-2020, 07:29 PM
Last Post: mckinneycm
  hex file to binary or pcap to binary baran01 1 5,728 Dec-11-2019, 10:19 PM
Last Post: Larz60+
  Manipulating Excel with Python. Spacely 2 3,662 Jun-25-2019, 01:57 AM
Last Post: Dequanharrison
  How to Read Binary Data pyth0nus3r 1 2,234 Jun-09-2019, 08:58 PM
Last Post: DeaD_EyE
  Parse Binary Data File and convert Epoch Time drdevereaux 1 3,220 May-16-2019, 01:56 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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