[python] add hex text file to binary file
This commit is contained in:
commit
91e3e5195d
1
python/hex_text2bin/text.bin
Normal file
1
python/hex_text2bin/text.bin
Normal file
@ -0,0 +1 @@
|
|||||||
|
<EFBFBD>リ[#<23>ル
|
||||||
1
python/hex_text2bin/text.txt
Normal file
1
python/hex_text2bin/text.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
FFD85B0423FFD9
|
||||||
8
python/hex_text2bin/text2bin.py
Normal file
8
python/hex_text2bin/text2bin.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
file_path = "text.txt"
|
||||||
|
with open(file_path, "r") as file:
|
||||||
|
text_data = file.read()
|
||||||
|
|
||||||
|
binary_data = bytes.fromhex(text_data)
|
||||||
|
|
||||||
|
with open("text.bin", "wb") as file:
|
||||||
|
file.write(binary_data)
|
||||||
Loading…
Reference in New Issue
Block a user