mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-05 16:25:14 -04:00
some small fixes
This commit is contained in:
parent
a50737bc6b
commit
52067188ed
11 changed files with 65 additions and 0 deletions
14
Useful_Scripts/bits_to_char.py
Normal file
14
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