Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Binary file
#6
I thought you were starting with b'B\xda\xed\xc5'. That doesn't yield those binary strings.

If you're starting with 01011111 00011000 01100101 00111010, then yes you can just smash them together.

>>> binary_string = "01011111 00011000 01100101 00111010"
>>> int(binary_string.replace(" ", ""), 2)
1595434298
Reply


Messages In This Thread
Binary file - by Aussie - Aug-28-2020, 09:54 AM
RE: Binary file - by Gribouillis - Aug-28-2020, 11:11 AM
RE: Binary file - by Aussie - Aug-30-2020, 10:16 PM
RE: Binary file - by bowlofred - Aug-30-2020, 10:53 PM
RE: Binary file - by Aussie - Aug-31-2020, 12:21 AM
RE: Binary file - by bowlofred - Aug-31-2020, 02:29 AM
RE: Binary file - by Aussie - Aug-31-2020, 03:09 AM
RE: Binary file - by bowlofred - Aug-31-2020, 04:01 AM
RE: Binary file - by Aussie - Aug-31-2020, 04:46 AM
RE: Binary file - by bowlofred - Aug-31-2020, 06:21 AM
RE: Binary file - by Aussie - Aug-31-2020, 06:01 AM
RE: Binary file - by Gribouillis - Aug-31-2020, 06:43 AM
RE: Binary file - by Aussie - Aug-31-2020, 09:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I read and write a binary file in Python? blackears 6 7,843 Jun-06-2023, 06:37 PM
Last Post: rajeshgk
  Hashing an address for binary file Python_help 8 2,827 Nov-04-2021, 06:23 AM
Last Post: ndc85430
  Read/Write binary file deanhystad 3 3,336 Feb-01-2021, 10:29 AM
Last Post: Larz60+
  Binary File Error SalsaBeanDip 1 1,818 Oct-12-2020, 09:13 PM
Last Post: bowlofred
  Convert file of hex strings to binary file medatib531 4 14,004 Oct-09-2020, 05:42 PM
Last Post: DeaD_EyE
  Binary File Read Aussie 6 8,738 Sep-03-2020, 03:57 AM
Last Post: deanhystad
  python read binary file Pyguys 4 4,069 Jul-13-2020, 02:34 AM
Last Post: Pyguys
  Failure in writing binary text to file Gigux 7 3,955 Jul-04-2020, 08:41 AM
Last Post: Gigux
  search binary file and list all founded keyword offset Pyguys 4 2,894 Mar-17-2020, 06:46 AM
Last Post: Pyguys
  hex file to binary or pcap to binary baran01 1 5,792 Dec-11-2019, 10:19 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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