Skip to content

Commit

Permalink
BugFix v2.5.1 添加fofa api参数,修复导出为json的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Cl0udG0d committed Aug 25, 2024
1 parent dcd1001 commit ab88324
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@ PS: 感谢[FOFA](https://fofa.info/)提供这么好的测绘工具

非付费会员,fofa数据采集工具

`-f` 参数开启关键字fuzz

`--authorization` 指定登录用户的 authorization , authorization需要F12获取

使用示例
> fofa-hack.exe --keyword thinkphp --endcount 500
>
> fofa-hack.exe --keyword thinkphp --endcount 500 --authorization your_authorization

### 安装

Expand All @@ -40,14 +35,15 @@ Fofa-hack>python fofa.py -h
|__| \____/|__| /__/\__\
_ _ ____ ____ __ __
| |_| | / () \ / (__`| |/ /
|_| |_|/__/\__\\____)|__|\__\ V2.4.16
|_| |_|/__/\__\\____)|__|\__\ V2.5.1
公众号: 黑糖安全
usage: fofa.py [-h] (--keyword KEYWORD | --inputfile INPUTFILE | --base BASE | --iconurl ICONURL | --iconfile ICONFILE) [--timesleep TIMESLEEP] [--timeout TIMEOUT] [--endcount ENDCOUNT] [--level LEVEL] [--output OUTPUT]
[--outputname OUTPUTNAME] [--fuzz] [--proxy-type {socks4,socks5,http}] [--authorization AUTHORIZATION] [--authorization-file AUTHORIZATION_FILE] [--proxy PROXY | --proxy-url PROXY_URL | --proxy-file PROXY_FILE]
usage: fofa.py [-h] (--keyword KEYWORD | --inputfile INPUTFILE | --base BASE | --iconurl ICONURL | --iconfile ICONFILE) [--timesleep TIMESLEEP] [--timeout TIMEOUT] [--endcount ENDCOUNT] [--level LEVEL]
[--output OUTPUT] [--outputname OUTPUTNAME] [--fuzz] [--proxy-type {socks4,socks5,http}] [--authorization AUTHORIZATION] [--authorization-file AUTHORIZATION_FILE] [--fofa-key FOFA_KEY]
[--proxy PROXY | --proxy-url PROXY_URL | --proxy-file PROXY_FILE]
Fofa-hack v2.4.16 使用说明
Fofa-hack v2.5.1 使用说明
optional arguments:
-h, --help show this help message and exit
Expand Down Expand Up @@ -77,6 +73,7 @@ optional arguments:
指定Authorization值
--authorization-file AUTHORIZATION_FILE
从文件中读取authorization列表 --authorization-file authorization.txt
--fofa-key FOFA_KEY fofa api key值(配合fofa终身会员使用)
--proxy PROXY 指定代理,代理格式 --proxy '127.0.0.1:7890'
--proxy-url PROXY_URL
指定代理url,即访问URL响应为proxy,代理格式 --proxy-url http://127.0.0.1/proxy_pool/get
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG 代码变更记录

### 2.5.1
+ 添加 --fofa-key 参数 (优化中)
+ 修复BUG [issue 86](https://github.com/Cl0udG0d/Fofa-hack/issues/86)

### 2.4.18
+ 合入(pull request)(https://github.com/Cl0udG0d/Fofa-hack/pull/85)

Expand Down
2 changes: 2 additions & 0 deletions fofa.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ def main():
level = args.level if args.level else "1"
level_data = LevelData(level)
fuzz = args.fuzz


output = args.output if args.output else "txt"
outputname = args.outputname if args.outputname else "fofaHack"

Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ colorama==0.4.6
cryptography==43.0.0
decorator==5.1.1
docutils==0.20.1
filelock==3.15.4
idna==3.4
importlib-metadata==7.0.1
importlib_resources==6.4.0
Expand All @@ -33,11 +34,13 @@ pyinstaller-hooks-contrib==2024.1
pywin32-ctypes==0.2.2
readme_renderer==43.0
requests==2.27.1
requests-file==2.1.0
requests-toolbelt==1.0.0
retry==0.9.2
rfc3986==2.0.0
rich==13.7.1
SecretStorage==3.3.3
tldextract==5.1.2
twine==5.1.1
typing_extensions==4.12.2
urllib3==1.26.19
Expand Down
2 changes: 1 addition & 1 deletion tookit/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# @File : config.py
# @Github: https://github.com/Cl0udG0d

VERSION_NUM = "2.5.0"
VERSION_NUM = "2.5.1"
ROOT_PATH = ""
AUTHORIZATION = ""
AUTHORIZATION_LIST = [
Expand Down
4 changes: 2 additions & 2 deletions tookit/outputData.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class OutputData:

ENCODING_TYPE="utf-8"

def __init__(self,filename, outputname, level="1",pattern="txt"):
def __init__(self,filename, level="1",pattern="txt"):
self.filename=filename
self.outputname=outputname
# self.outputname=outputname
self.pattern = pattern if self.checkPatternStandard(pattern) else "txt"
self.level=level
# self.path=os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(__file__))),self.filename)
Expand Down

0 comments on commit ab88324

Please sign in to comment.