Skip to content

Commit

Permalink
Adjust cofiguration file
Browse files Browse the repository at this point in the history
  • Loading branch information
boy-hack committed Aug 7, 2018
1 parent 051dff6 commit fdd84a1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ w11scan是一款分布式的WEB指纹识别系统(包括CMS识别、js框架
## Featrue
1. 每个指纹都会有一个`命中率`标记,每次识别成功后,相应指纹命中率会增加,使用指纹时优先使用命中率高的指纹。
2. 优先使用命中率最高的指纹,其次,将指纹按照访问路径分类排序,再优先使用访问路径次数最多的指纹。
2. 搜索支持多种语法,全文搜索
3. 一个指纹识别成功后,会停止识别该URL的其他指纹,开始下一个任务
4. 搜索功能支持多种语法,全文搜索(mongodb特性)

## show
Preview [https://x.hacking8.com/?tag=w11scan](https://x.hacking8.com/?tag=w11scan)
Expand Down
4 changes: 2 additions & 2 deletions cms/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
from whatcms import celery_app
from cms.otherscan import WebEye
import builtwith
from config import redis_host,redis_port,mongodb_host,mongodb_password,mongodb_port,mongodb_username
from config import redis_host,redis_port,mongodb_host,mongodb_password,mongodb_port,mongodb_username,redis_password

redisConn = redis.Redis(host=redis_host, port=redis_port, decode_responses=True)
redisConn = redis.Redis(host=redis_host, port=redis_port, password=redis_password,decode_responses=True)

class MongDB(object):
def __init__(self,database = 'w11scan'):
Expand Down
23 changes: 18 additions & 5 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
class Config(object):
UserName = "admin"
PassWord = "admin"

BROKER_URL = "redis://localhost:6379/1"
CELERY_RESULT_BACKEND = "mongodb://localhost:27017/w11scan_celery"
PassWord = "w11scan"

redis_host = "localhost"
redis_port = 6379
redis_password = ""

mongodb_host = 'localhost'
mongodb_port = 27017
mongodb_username = ''
mongodb_password = ''
mongodb_password = ''

BROKER_URL = "redis://localhost:6379/1"
# redis://password@hostname:port/db_number
if redis_password == "":
BROKER_URL = "redis://{}:{}/1".format(redis_host,redis_port)
else:
BROKER_URL = "redis://{}@{}:{}/1".format(redis_password,redis_host,redis_port)

CELERY_RESULT_BACKEND = "mongodb://localhost:27017/w11scan_celery"
# mongodb://user:password@localhost:27017/w11scan_celery

if mongodb_username == "" and mongodb_password == "":
CELERY_RESULT_BACKEND = "mongodb://{}:{}/w11scan_celery".format(mongodb_host,mongodb_port)
else:
CELERY_RESULT_BACKEND = "mongodb://{}:{}@{}:{}/w11scan_celery".format(mongodb_username,mongodb_password,mongodb_host,mongodb_port)

0 comments on commit fdd84a1

Please sign in to comment.