收集常用的资源涉及:python资源包、组件的资源等.
python package
- jsonpath怎么玩
- 文件时间
- a =time.localtime((os.path.getatime(VULNBOXFILE) ))#输出文件访问时间
- b=os.path.getctime(VULNBOXFILE) #输出文件的创建时间
- c = os.path.getctime(VULNBOXFILE) #输出文件最近修改时间
- yara-python
- brew install yara
- pip install yara-python
- fake-useragent
- 任务队列
- 异步请求
- aiohttp
- asyncio
- aiodns
- aiomultiprocess
spider resource
- User-Agents
- request
- session在保持登录状态的使用以及302的使用
fuzzy hash
- TLSH A Trend Micro fuzzy hash.
- Sdhash: another fuzzy hash like algorithm.
各大扫描API
functools.partial 通过包装手法,允许我们 "重新定义" 函数签名,见适配器模式.
import requests
from tqdm import tqdm
def get_vedio(url,name):
resp = requests.get(url=url,stream=True)
content_size = int(resp.headers['Content-Length'])/1024/1024
with open(name, "wb") as f:
print "download file {}, total size: {}M".format(name,content_size)
for data in tqdm(iterable=resp.iter_content(1024*1024),total=content_size,unit='M'):
f.write(data)
def get_content(filename):
data = []
with open(filename) as f:
lines = f.readlines()
for line in lines:
data.append(line.strip())
return data
if __name__ == '__main__':
urls = get_content('urls.txt')
for url in urls:
name = url.split('/')[-1]
turl = "http://video.xxxxxxx.com/"+url
get_vedio(turl,name)
python-dotenv :帮你更好的管理 Python 项目中敏感配置信息的开源三方库.