青少年ctf

编程入门 行业动态 更新时间:2024-10-09 03:30:27

<a href=https://www.elefans.com/category/jswz/34/1768277.html style=青少年ctf"/>

青少年ctf

题目描述:安全工程师拿到一个日志,里面有一条上传木马的记录,找到那个上传黑客的ip(某网站被上传了木马,找出上传木马黑客的ip,上传文件所在文件夹为uploads),flag格式为:ip地址。

思路:首先文件上传,那么状态码一定是200,并且要是包含文件夹uploads

编写代码

file = open('access.log', 'r')
lines = file.readlines()
for line in lines:if "uploads" in line and "200" in line:print(line)
file.close()

但是这个会出现贼多记录,进一步想法,既然上传木马,那就从后缀入手,那就浅浅试两个php和jsp

file = open('access.log', 'r')
lines = file.readlines()
for line in lines:if "uploads" in line and "200" in line:if "php" in line or "asp" in line:print(line)
file.close()

不出意外,出货了

那么结束

 

更多推荐

青少年ctf

本文发布于:2024-02-27 01:02:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1704636.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:青少年   ctf

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!