Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- from socket import *
- from struct import *
- import struct
- bit = struct.calcsize("P") * 8
- if (bit ==32):
- porta=24000
- else:
- porta=24001
- s = socket(AF_INET, SOCK_STREAM)
- s.connect(('semtex.labs.overthewire.org', porta))
- f=open('file','wb')
- i=1
- while 1:
- a = s.recv(1)
- if (i%2 == 0):
- i += 1
- else:
- if not a:
- break;
- else:
- i += 1
- f.write(a)
- f.close()
- print i
- s.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement