8

配置oneforall

 1 year ago
source link: https://sn1per-ssd.github.io/2022/10/14/%E9%85%8D%E7%BD%AEoneforall/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

配置oneforall

阅读数:2822次

2022-10-14

字数统计: 355字

  |   阅读时长≈ 1分

调(pei)教(zhi)了一下资产搜集用的oneforall工具,让它能更好用一些

位置:根目录/config/setting.py63行开始

enable_request_proxy模块改为True,在下面的69行修改自己的代理端口就行了如下:

# 代理设置
enable_request_proxy = True # 是否使用代理(全局开关)
proxy_all_module = False # 代理所有模块
proxy_partial_module = ['GoogleQuery', 'AskSearch', 'DuckDuckGoSearch',
'GoogleAPISearch', 'GoogleSearch', 'YahooSearch',
'YandexSearch', 'CrossDomainXml',
'ContentSecurityPolicy'] # 代理自定义的模块
request_proxy_pool = [{'http': 'http://127.0.0.1:7890',
'https': 'https://127.0.0.1:7890'}] # 代理池
# request_proxy_pool = [{'http': 'socks5h://127.0.0.1:10808',
# 'https': 'socks5h://127.0.0.1:10808'}] # 代理池

配置API

位置:根目录/config/api.py

里面所有的API都可进行配置,以fofa为例,访问fofa,打开个人中心,复制APIKEY和邮箱到api.py中,其他不作赘述。

检测网络环境时出现问题

检测网络环境的时候一直提示连接中断

image-1665730087173.jpg

位置:根目录/common/utils.py500行

两个方法,一个是修改urls里的网址,改为国内可访问的网址。

第二个方法,新增代码proxy = get_random_proxy()并将510行的代码修改如下:

rsp = session.get(url, headers=header, proxies=proxy, timeout=timeout, verify=verify)

剩下基本都不会有了

扫一扫,分享到微信

Related Issues not found

Please contact @Sn1pEr-ssd to initialize the comment


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK