Sign inSign up

jstang/buoy

By jstang

Updated over 5 years ago

渗透系统组件

Image
0

328

jstang/buoy repository overview

msf调用服务 pymsf.settings.py

# MSF RPC
MSF_USER = "msf"
MSF_PASSWORD = "123456"
MSF_HOST = "172.31.50.249"  # k8s建解析服务
MSF_PORT = 55553
MSF_SSL = False

# Redis
REDIS_HOST = "172.31.50.249"  # k8s建解析服务
REDIS_PORT = 6379

# Queue
QUEUE_NAME = "msf"
THREAD_POOL = 5

# Running
Registry_Host = "172.31.50.249"
Registry_Port = 8500
Server_Name = "msf"
Server_Addr = "172.31.50.249"

web客户端服务 view.nginx.conf

user  nginx;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name  localhost;
        root /usr/share/nginx/html/dist;
        index index.html index.htm index.php;

        location / {
            try_files $uri $uri/ /index.html?$args;
        }

        location /prod-api/ {
            proxy_pass http://172.31.50.249:8700/;
        }
    }
}

docker run -itd -v /home/nginx.conf:/etc/nginx/nginx.conf -p 80:80 --name view jstang/buoy:view1.0

后端服务 backend (base.toml、micro.toml、mysql_map.toml、redis_map.toml)
base.toml

# This is base config

[base]
    debug_mode="debug"
    time_location="Asia/Chongqing"

[http]
    addr =":8700"                       # 监听地址, default ":8700"
    read_timeout = 10                   # 读取超时时长
    write_timeout = 10                  # 写入超时时长
    max_header_bytes = 20               # 最大的header大小,二进制位长度
    allow_ip = [                        # 白名单ip列表
        "127.0.0.1",
        "192.168.1.1",
        "172.31.50.249"
    ]

[session]
    redis_server = "172.31.50.249:6379"   #redis session server
    redis_password = ""

[log]
    log_level = "trace"         #日志打印最低级别
    [log.file_writer]           #文件写入配置
        on = true
        log_path = "./logs/buoy.inf.log"
        rotate_log_path = "./logs/buoy.inf.log.%Y%M%D%H"
        wf_log_path = "./logs/buoy.wf.log"
        rotate_wf_log_path = "./logs/buoy.wf.log.%Y%M%D%H"
    [log.console_writer]        #工作台输出
        on = false
        color = false

[cluster]
    cluster_ip="172.31.50.249"
    cluster_port="8700"
    cluster_ssl_port="4880"

[swagger]
    title="Buoy swagger API"
    desc="This is a sample server celler server."
    host="172.31.50.249:8700"
    base_path=""
    version="1.0"
    # schemes="http,https"
    schemes = [
        "http",
        "https"
    ]

[msf]
    host="172.31.50.249:55552"
    pass="123456"
    user="msf"

[queue]
    msf_task_list="msf"
    poc_task_list="pocsuite"

micro.toml

# This is micro-service config

[consul]
    registry_address="172.31.50.249:8500"  # 服务注册中心地址

[service]
    asset="asset_scanner"
    msf="msf"  # 服务名
    pocsuite="pocsuite"

[msf]
    name="msf"  # 服务名

mysql_map.toml

# this is mysql config
[list]
    [list.default]
        driver_name = "mysql"
        data_source_name = "root:123456@tcp(172.31.50.249:3306)/buoy?charset=utf8&parseTime=true&loc=Asia%2FChongqing"
        max_open_conn = 20
        max_idle_conn = 10
        max_conn_life_time = 100

redis_map.toml

# this is redis config file
[list]
    [list.default]
        proxy_list = ["172.31.50.249:6379"]
        max_active = 100
        max_idle = 100
        down_grade = false
        db = 0
        # password = "123"
        # conn_timeout = 1
        # read_timeout = 2
        # write_timeout = 3

docker run -itd --name backend -v base.toml:/opt/conf/dev/base.toml -v micro.toml:/opt/conf/dev/micro.toml -v redis_map.toml:/opt/conf/dev/redis_map.toml -v mysql_map.toml:/opt/conf/dev/mysql_map.toml -p 8700:8700 jstang/buoy:backend1.0

Tag summary

Content type

Image

Digest

Size

52.3 MB

Last updated

over 5 years ago

docker pull jstang/buoy:view1.0