mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-02 14:56:10 -04:00
Reorganized
This commit is contained in:
parent
ab54dc8e70
commit
2afd831662
281 changed files with 253 additions and 33 deletions
14
Other_Hackings/useful_scripts/bits_to_char.py
Normal file
14
Other_Hackings/useful_scripts/bits_to_char.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# read data
|
||||
data = []
|
||||
with open('hidden-message.pcap', 'rb') as f:
|
||||
data = f.read()
|
||||
|
||||
# get bits
|
||||
bits = ''
|
||||
for i in xrange(75, len(data), 81):
|
||||
bits += '0' if data[i:i+1]=='I' else '1'
|
||||
# convert to chars
|
||||
flag = ''
|
||||
for i in xrange(0, len(bits), 8):
|
||||
flag += chr(int(bits[i:i+8], 2))
|
||||
print flag
|
Loading…
Add table
Add a link
Reference in a new issue