青少年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
发布评论