Home

Awesome

最新更新

2023.09.14

image

python3 manage.py crontab add # 添加计划任务
python3 manage.py crontab show # 查看计划任务

2023.09.12

2023.09.11

通知

请因缺少依赖库、依赖库版本不对、缺少组件、数据库账号口令与配置文件不同等引发的报错的使用者,先自行Google解决。

对于没有兴趣自己解决环境报错的小伙伴们,这里提供了虚拟机文件可直接下载导入运行。

ApolloScanner

自动化巡航扫描框架(可用于红队打点评估) 图片

安装

提供了虚拟机版本

cd ~/ApolloScanner
sudo python3.8 manage.py runserver 0.0.0.0:8080
sudo ifconfig -a 
# 查看所有网卡,假设网卡为ens33
# 调整为NAT模式
sudo ifconfig ens33 down
sudo ifconfig ens33 up

图片

源码安装

sudo apt install masscan nmap libmysqlclient-dev mysql-server
sudo python3 -m pip install -r requirments.txt
# 需要手动修改mysql root密码 创建Apollo 数据库 并修改settings.py 中的数据库账密
sudo python3 manage.py migrate
sudo python3 manage.py createsuperuser
sudo python3 manage.py runserver 0.0.0.0:80

功能

exp编写规范

def brute_scan_function_name(ipaddress, port, username, password, logger):  
    import xx_module # 引入模块全部在函数内容写
    # ... 
    # ...是爆破exp核心代码
    logger.log("xxxxx") # 代替print
    return True  # 返回必须是true/false
def brute_scan_function_name(ipaddress, port, logger):  
    import xx_module # 引入模块全部在函数内容写
    # ... 
    # ...是漏扫exp核心代码
    logger.log("xxxxx") # 代替print
    return True  # 返回必须是true/false

报错解答

1、缺乏mysql_config命令:

Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [11 lines of output]
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-2er683ou/mysqlclient_5ba8560cf6ca429b8316cf1cf6771c9a/setup.py", line 16, in
metadata, options = get_config()
File "/tmp/pip-install-2er683ou/mysqlclient_5ba8560cf6ca429b8316cf1cf6771c9a/setup_posix.py", line 51, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-2er683ou/mysqlclient_5ba8560cf6ca429b8316cf1cf6771c9a/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_mysql_config_path,))
OSError: mysql_config not found
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

关于一些异常简单的报错的解答:

目前看到一些ISSUE报错的原因是以下几种情况: