Skip to content

Commit

Permalink
Feature | 更新部分功能,详情见CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
Cl0udG0d committed Apr 2, 2023
1 parent d3f1663 commit 2239b0a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# @Github: https://github.com/Cl0udG0d

# Fofa-hack 版本号
VERSION_NUM="2.1.1"
VERSION_NUM="2.1.2"
# 登录最大重试次数
MAX_LOGIN_RETRY_NUM=3
# 页面URL获取最大重试次数
Expand Down
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# CHANGELOG 代码变更记录
### 2.1.2

+ 修复 host="edu.cn" 搜索错误

### 2.1.1

Expand Down
3 changes: 1 addition & 2 deletions docs/TODO.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# TODO

+ 修复 host="edu.cn" 搜索错误
+ 高级语法混合使用情况下的报错处理
+ 高级语法混合使用情况下的报错处理,增加程序稳定性
+ 2.2.x版本添加代理
+ fofa的两种URL获取逻辑
+ 合并FUZZ关键字并进行递归
7 changes: 5 additions & 2 deletions fofa.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def initKeyWord(self,keyword):
# print(tempkey)

if '"' not in tempkey and ' ' not in tempkey:
tempkey='"{}"'.format(tempkey)
if "=" in tempkey:
tempkey=tempkey.split("=")[0]+'="'+tempkey.split("=")[1]+'"'
else:
tempkey='"{}"'.format(tempkey)
return tempkey

def init(self):
Expand All @@ -95,7 +98,7 @@ def init(self):
args = parser.parse_args()
self.timeSleep= int(args.timesleep)
self.timeout = int(args.timeout)
# print(args.keyword)
print("input: "+args.keyword)
self.searchKey=self.initKeyWord(args.keyword)
if args.endcount:
self.endcount=int(args.endcount)
Expand Down
25 changes: 17 additions & 8 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@
import json
import time

import requests
from lxml import etree
# import requests
# from lxml import etree
#
# from tookit.bypass import ByPass
#
# request_url = 'https://fofa.info/result?qbase64=InRoaW5rcGhwIg%3D%3D'
# # print(f'request_url:{request_url}')
# rep = requests.get(request_url, timeout=5)
# # print(rep.text)
# bypass = ByPass(rep.text)
import click

from tookit.bypass import ByPass
@click.command()
@click.option('--n', default="aaa")
def dots(n):
click.echo(n)

request_url = 'https://fofa.info/result?qbase64=InRoaW5rcGhwIg%3D%3D'
# print(f'request_url:{request_url}')
rep = requests.get(request_url, timeout=5)
# print(rep.text)
bypass = ByPass(rep.text)
if __name__ == '__main__':
dots()

0 comments on commit 2239b0a

Please sign in to comment.