欢迎大家一起来Hacking水友攻防实验室学习,渗透测试,代码审计,免杀逆向,实战分享,靶场靶机,求关注
Web3 作业
一、写一个脚本判断fck的版本
思路:找到“version”字段,向下取30个字符,其中规则匹配1.2 1.2.3 1.2.3.4 这样的。输出。
Python脚本:
import os
import re
import requests
def check(url):
headers={
'User-Agent':"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
}
res = requests.get(url)
return res.text
def getans(aim):
pattern = re.compile(r'((\d.){2,4})')
res = pattern.findall(aim)
print('the version code is : ')
print(res[0][0][0:-1])
def main():
print('this message is from main function')
res = check('http://www.yunusemre.net/trpanel/fckeditor/editor/dialog/fck_about.html')
#print(len(res))
firstposition = res.find('version')
endposition = firstposition + 100
aim = res[firstposition:endposition]
# print(aim)
getans (aim)
if __name__ == '__main__':
main()
二、搜索至少10个fck的目标
这个简单,直接在fofa中,header:”/fckeditor/editor/dialog/fck_about.html”
或者直接googlehacking: inurl:“/fckeditor/editor/dialog/fck_about.html”
目标如下:
egs-.*: src/fckeditor/editor/dialog/fck_about.html | Fossies 2.2
https://maybank-uum.angelfire.com/fckeditor/editor/dialog/fck_about.html 2.4.2
https://pokeyplay.com/libreria/fckeditor/editor/dialog/fck_about.html 2.4.2