开源基于Rust编写的Web服务器

基于 RUST 的 WEB 资源服务器

Github 地址

LTPP-GIT 地址

官方文档

该项目于 2024 年 5 月 1 日开始开发

预期功能

功能支持情况当前情况
多线程支持
服务支持配置化
防盗链支持
gzip 支持
反向代理支持
自定义状态码对应资源文件
日志支持
负载均衡支持
域名绑定解析支持
资源解析
history 模式支持
自定义响应头

目前进度

  • 自定义响应头
  • 多线程支持
  • 配置化
  • 日志输出
  • 资源解析
  • history 模式支持
  • 域名绑定支持
  • 一个端口对应多域名支持
  • 反向代理支持
  • 负载均衡支持
  • 防盗链支持
  • gzip 支持

错误页

  • root_path 下名称为 对应状态码.html,例如 404 对应页面 404.html

JSON 示例

首次运行会自动生成 config.json 配置文件,填写好后重新运行即可

以上配置将当前目录作为访问地址的根目录,
监听了 8081 端口,绑定 IP域名127.0.0.1localhost 用来处理请求,
当访问为空则重写路径到当前目录的 index.html(适用于 Vue 等打包后的资源),
日志保存在当前目录 logs

配置中的 listen_ip 为服务端 IPbind_server_name 下的 key 为域名或者 IP, 一般 listen_ip127.0.0.1
如果 bind_server_name 配置了 localhost 域名,那么可以使用 localhost 访问,
但是不支持 127.0.0.1,如需支持 127.0.0.1,在 bind_server_name 中添加即可
如果本地做了映射,需要同时添加映射的域名和 127.0.0.1

反向代理

  • 系统会检测 proxy 数组里每个元素是否是合法 URL,如果是合法 URL 那么系统会加入到反向代理的列表,如果最终反向代理列表为空则会加载静态资源
  • 反向代理会映射请求路径和请求参数,如果配置文件 proxy 中的元素加了路径,系统会忽略
  • 反向代理时,会随机从反向代理列表中获取一个代理地址 PROXY_URL ,系统会截取 PROXY_URL 字段除了 path 部分的 url,实际 path 来自请求时的 path,参数会进行拼接,如果 PROXY_URL 参数和请求参数冲突,请求参数会追加在 PROXY_URL 参数后面

负载均衡

  • 反向代理时,会随机从反向代理列表中获取一个代理地址 PROXY_URL

GZIP

  • 请求头 Accept-Encoding 需要包含 gzip 并且响应头 Content-Encoding 需要包含 gzip
  • 配置 gzip_level 用于设置压缩率,范围从 1 - 9,越大压缩的越小,耗时也会更久,建议 4/5 即可

异常

  • 如果出现页面/请求加载异常的情况,需要增加 buffer_size 数值

防盗链

  • hotlink_protection 使用正则进行匹配(系统内部会额外处理…/防盗链情况)

运行效果

配置文件示例

{
  "server": [
    {
      "listen_ip": "0.0.0.0",
      "listen_port": 80,
      "bind_server_name": {
        "127.0.0.1": {
          "root_path": "./",
          "buffer_size": 10240,
          "gzip_level": 1,
          "log_dir_path": "./logs",
          "empty_path_try_files_path": "./index.html",
          "response_header_list": [
            "Server: RUST-WEB-SERVER",
            "Access-Control-Allow-Credentials: true",
            "Access-Control-Allow-Headers: *",
            "Access-Control-Allow-Methods: *",
            "Access-Control-Allow-Origin: *",
            "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
            "Content-Type: text/html",
            "Content-Encoding: gzip"
          ],
          "proxy": [],
          "proxy_timeout_seconds": 10,
          "hotlink_protection": []
        },
        "localhost": {
          "root_path": "./",
          "buffer_size": 10240,
          "gzip_level": 1,
          "log_dir_path": "./logs",
          "empty_path_try_files_path": "./index.html",
          "response_header_list": [
            "Server: RUST-WEB-SERVER",
            "Access-Control-Allow-Credentials: true",
            "Access-Control-Allow-Headers: *",
            "Access-Control-Allow-Methods: *",
            "Access-Control-Allow-Origin: *",
            "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
            "Content-Type: application/json",
            "Content-Encoding: gzip"
          ],
          "proxy": [
            "https://api.ltpp.vip",
            "https://api.ltpp.vip/Version/getVersion",
            "https://api.ltpp.vip/Version/getVersion?origin=proxy1"
          ],
          "proxy_timeout_seconds": 10,
          "hotlink_protection": []
        }
      }
    },
    {
      "listen_ip": "0.0.0.0",
      "listen_port": 81,
      "bind_server_name": {
        "127.0.0.1": {
          "root_path": "./",
          "buffer_size": 10240,
          "gzip_level": 1,
          "log_dir_path": "./logs",
          "empty_path_try_files_path": "./index.html",
          "response_header_list": [
            "Access-Control-Allow-Origin: *",
            "Access-Control-Allow-Methods: *",
            "Access-Control-Allow-Headers: *",
            "Access-Control-Allow-Credentials: true",
            "Server: RUST-WEB-SERVER",
            "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
            "Content-Type: application/json",
            "Content-Encoding: gzip"
          ],
          "proxy": ["https://api.ltpp.vip/Version/getVersion?origin=proxy1"],
          "proxy_timeout_seconds": 10,
          "hotlink_protection": ["origin=1$"]
        }
      }
    }
  ]
}

运行效果

在这里插入图片描述
在这里插入图片描述

日志

支持配置,日期和完整请求记录

[2024-05-28 23:40:07]
Binding => 127.0.0.1:80
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Server: RUST-WEB-SERVER",
        "Access-Control-Allow-Credentials: true",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Origin: *",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: text/html",
        "Content-Encoding: gzip",
    ],
    proxy: [],
    proxy_timeout_seconds: 10,
    hotlink_protection: [],
}
Binding => localhost:80
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Server: RUST-WEB-SERVER",
        "Access-Control-Allow-Credentials: true",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Origin: *",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: application/json",
        "Content-Encoding: gzip",
    ],
    proxy: [
        "https://api.ltpp.vip",
        "https://api.ltpp.vip/Version/getVersion",
        "https://api.ltpp.vip/Version/getVersion?origin=proxy1",
    ],
    proxy_timeout_seconds: 10,
    hotlink_protection: [],
}



[2024-05-28 23:40:07]
Binding => 127.0.0.1:80
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Server: RUST-WEB-SERVER",
        "Access-Control-Allow-Credentials: true",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Origin: *",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: text/html",
        "Content-Encoding: gzip",
    ],
    proxy: [],
    proxy_timeout_seconds: 10,
    hotlink_protection: [],
}
Binding => localhost:80
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Server: RUST-WEB-SERVER",
        "Access-Control-Allow-Credentials: true",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Origin: *",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: application/json",
        "Content-Encoding: gzip",
    ],
    proxy: [
        "https://api.ltpp.vip",
        "https://api.ltpp.vip/Version/getVersion",
        "https://api.ltpp.vip/Version/getVersion?origin=proxy1",
    ],
    proxy_timeout_seconds: 10,
    hotlink_protection: [],
}



[2024-05-28 23:40:07]
Binding => 127.0.0.1:81
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Access-Control-Allow-Origin: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Credentials: true",
        "Server: RUST-WEB-SERVER",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: application/json",
        "Content-Encoding: gzip",
    ],
    proxy: [
        "https://api.ltpp.vip/Version/getVersion?origin=proxy1",
    ],
    proxy_timeout_seconds: 10,
    hotlink_protection: [
        "origin=1$",
    ],
}



[2024-05-28 23:40:07]
Listening => 0.0.0.0:80


[2024-05-28 23:40:07]
Binding => 127.0.0.1:80


[2024-05-28 23:40:07]
Binding => localhost:80


[2024-05-28 23:40:07]
Binding => 127.0.0.1:80


[2024-05-28 23:40:07]
Listening => 0.0.0.0:81


[2024-05-28 23:40:07]
Binding => 127.0.0.1:81


[2024-05-28 23:40:07]
Binding => localhost:81


[2024-05-28 23:40:07]
Binding => 127.0.0.1:81


[2024-05-28 23:40:10]
HttpRequest {
    path: "/_static/out/browser/serviceWorker.js",
    method: "GET",
    query: [],
    headers: {
        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        "accept": "*/*",
        "service-worker": "script",
        "sec-fetch-dest": "serviceworker",
        "sec-fetch-mode": "same-origin",
        "referer": "http://127.0.0.1/_static/out/browser/serviceWorker.js",
        "accept-encoding": "gzip, deflate, br, zstd",
        "cache-control": "max-age=0",
        "host": "127.0.0.1",
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        "cookie": "SameSite=Lax; Hm_lvt_9793f42b498361373512340937deb2a0=1689155374; _ga=GA1.1.39230079.1707025003; _ga_69MPZE94D5=GS1.1.1707025002.1.1.1707026740.0.0.0; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=5RJrrwsVlvqY7uteEWcRoXI%2BvTKWWpA23SKZpX9BCDRw8Q17ueAcTXRd8Po%3D",
        "sec-fetch-site": "same-origin",
        "connection": "keep-alive",
    },
    body: {
        "sec-fetch-site": [
            "same-origin",
        ],
        "accept-encoding": [
            "gzip, deflate, br, zstd",
        ],
        "accept": [
            "*/*",
        ],
        "user-agent": [
            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        ],
        "connection": [
            "keep-alive",
        ],
        "cache-control": [
            "max-age=0",
        ],
        "cookie": [
            "SameSite=Lax; Hm_lvt_9793f42b498361373512340937deb2a0=1689155374; _ga=GA1.1.39230079.1707025003; _ga_69MPZE94D5=GS1.1.1707025002.1.1.1707026740.0.0.0; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=5RJrrwsVlvqY7uteEWcRoXI%2BvTKWWpA23SKZpX9BCDRw8Q17ueAcTXRd8Po%3D",
        ],
        "accept-language": [
            "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        ],
        "sec-fetch-mode": [
            "same-origin",
        ],
        "host": [
            "127.0.0.1",
        ],
        "referer": [
            "http://127.0.0.1/_static/out/browser/serviceWorker.js",
        ],
        "sec-fetch-dest": [
            "serviceworker",
        ],
        "service-worker": [
            "script",
        ],
    },
}

[2024-05-28 23:40:10]
Resource load fail => ./_static/out/browser/serviceWorker.js


[2024-05-28 23:40:21]
HttpRequest {
    path: "/Version/getVersion",
    method: "GET",
    query: [
        (
            "origin",
            "proxy1",
        ),
    ],
    headers: {
        "sec-ch-ua-mobile": "?0",
        "connection": "keep-alive",
        "sec-ch-ua": "\"Microsoft Edge\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"",
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        "sec-fetch-site": "none",
        "sec-fetch-user": "?1",
        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        "sec-fetch-dest": "document",
        "host": "127.0.0.1:81",
        "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "accept-encoding": "gzip, deflate, br, zstd",
        "upgrade-insecure-requests": "1",
        "sec-fetch-mode": "navigate",
        "cookie": "SameSite=Lax; Hm_lvt_9793f42b498361373512340937deb2a0=1689155374; _ga=GA1.1.39230079.1707025003; _ga_69MPZE94D5=GS1.1.1707025002.1.1.1707026740.0.0.0; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=5RJrrwsVlvqY7uteEWcRoXI%2BvTKWWpA23SKZpX9BCDRw8Q17ueAcTXRd8Po%3D",
        "sec-ch-ua-platform": "\"Windows\"",
    },
    body: {
        "sec-fetch-user": [
            "?1",
        ],
        "accept-language": [
            "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        ],
        "sec-fetch-site": [
            "none",
        ],
        "accept": [
            "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        ],
        "sec-ch-ua-platform": [
            "\"Windows\"",
        ],
        "accept-encoding": [
            "gzip, deflate, br, zstd",
        ],
        "host": [
            "127.0.0.1:81",
        ],
        "sec-fetch-mode": [
            "navigate",
        ],
        "upgrade-insecure-requests": [
            "1",
        ],
        "sec-fetch-dest": [
            "document",
        ],
        "sec-ch-ua-mobile": [
            "?0",
        ],
        "cookie": [
            "SameSite=Lax; Hm_lvt_9793f42b498361373512340937deb2a0=1689155374; _ga=GA1.1.39230079.1707025003; _ga_69MPZE94D5=GS1.1.1707025002.1.1.1707026740.0.0.0; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=5RJrrwsVlvqY7uteEWcRoXI%2BvTKWWpA23SKZpX9BCDRw8Q17ueAcTXRd8Po%3D",
        ],
        "sec-ch-ua": [
            "\"Microsoft Edge\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"",
        ],
        "connection": [
            "keep-alive",
        ],
        "user-agent": [
            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        ],
    },
}

[2024-05-28 23:40:21]
Proxy url info => https://api.ltpp.vip:443/Version/getVersion?origin=proxy1&origin=proxy1


[2024-05-28 23:40:22]
Request response info:
HTTP/1.1 200 OK
content-length: 90
access-control-allow-methods: GET, POST, PATCH
access-control-allow-headers: Authorization,Requestid,Key,Content-Type,If-Match,If-Modified-Since,If-None-Match,If-Unmodified-Since,X-CSRF-TOKEN,X-Requested-With
git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git
access-control-allow-origin: *
content-encoding: gzip
access-control-allow-credentials: true
content-type: application/json
server: nginx
connection: keep-alive
date: Tue, 28 May 2024 15:40:21 GMT
strict-transport-security: max-age=88888888
access-control-max-age: 88888888



{"code":1,"version":"2.8.0","ltpp_win_download_url":"","ltpp_mac_download_url":"","ltpp_apk_download_url":""}


[2024-05-28 23:40:24]
HttpRequest {
    path: "/Version/getVersion",
    method: "GET",
    query: [
        (
            "origin",
            "proxy1",
        ),
    ],
    headers: {
        "connection": "keep-alive",
        "accept-encoding": "gzip, deflate, br, zstd",
        "cache-control": "max-age=0",
        "sec-fetch-mode": "navigate",
        "sec-ch-ua-platform": "\"Windows\"",
        "sec-fetch-site": "none",
        "host": "localhost",
        "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        "sec-ch-ua-mobile": "?0",
        "sec-fetch-user": "?1",
        "sec-fetch-dest": "document",
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        "upgrade-insecure-requests": "1",
        "cookie": "SameSite=Lax; NMTID=00O6oBSFUZ8KxSqKEY4tcbYD677Qa8AAAGKxntltw; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=c3t%2FwkS4xVdqQ2GLp7IkQdf9cc4d3ClA8ae5euc5DJ4EKvgSZv6qnjCaabI%3D",
        "sec-ch-ua": "\"Microsoft Edge\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"",
    },
    body: {
        "sec-ch-ua-platform": [
            "\"Windows\"",
        ],
        "sec-ch-ua": [
            "\"Microsoft Edge\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"",
        ],
        "upgrade-insecure-requests": [
            "1",
        ],
        "user-agent": [
            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        ],
        "cookie": [
            "SameSite=Lax; NMTID=00O6oBSFUZ8KxSqKEY4tcbYD677Qa8AAAGKxntltw; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=c3t%2FwkS4xVdqQ2GLp7IkQdf9cc4d3ClA8ae5euc5DJ4EKvgSZv6qnjCaabI%3D",
        ],
        "accept": [
            "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        ],
        "cache-control": [
            "max-age=0",
        ],
        "host": [
            "localhost",
        ],
        "sec-fetch-user": [
            "?1",
        ],
        "sec-fetch-dest": [
            "document",
        ],
        "accept-language": [
            "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        ],
        "connection": [
            "keep-alive",
        ],
        "sec-fetch-mode": [
            "navigate",
        ],
        "sec-ch-ua-mobile": [
            "?0",
        ],
        "accept-encoding": [
            "gzip, deflate, br, zstd",
        ],
        "sec-fetch-site": [
            "none",
        ],
    },
}

[2024-05-28 23:40:24]
Proxy url info => https://api.ltpp.vip:443/Version/getVersion?origin=proxy1


[2024-05-28 23:40:24]
Request response info:
HTTP/1.1 200 OK
content-length: 90
strict-transport-security: max-age=88888888
access-control-max-age: 88888888
access-control-allow-headers: Authorization,Requestid,Key,Content-Type,If-Match,If-Modified-Since,If-None-Match,If-Unmodified-Since,X-CSRF-TOKEN,X-Requested-With
content-type: application/json
access-control-allow-origin: *
access-control-allow-methods: GET, POST, PATCH
git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git
date: Tue, 28 May 2024 15:40:23 GMT
server: nginx
connection: keep-alive
content-encoding: gzip
access-control-allow-credentials: true



{"code":1,"version":"2.8.0","ltpp_win_download_url":"","ltpp_mac_download_url":"","ltpp_apk_download_url":""}



本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/679133.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【Python绘画】画笑脸简笔画

本文收录于 《一起学Python趣味编程》专栏,从零基础开始,分享一些Python编程知识,欢迎关注,谢谢! 文章目录 一、前言二、代码示例三、知识点梳理四、总结 一、前言 本文介绍如何使用Python的海龟画图工具turtle&#…

BUUCTF [XMAN2018排位赛]通行证 1

BUUCTF:https://buuoj.cn/challenges 题目描述: 得到的 flag 请包上 flag{} 提交。来源:https://github.com/hebtuerror404/CTF_competition_warehouse_2018 密文: a2FuYmJyZ2doamx7emJfX19ffXZ0bGFsbg解题思路: 1、两个等号…

CentOS-内网搭建FTP-Server

一、镜像选择 1、 Centos-everting或者DVD 2、7.5 7.6 7.9 均可 二、安装步骤 1、其余步骤和普通安装一致。 2、最重要的一步为“软件选择” 1、勾选FTP、文件以及存储服务器、性能以及开发工具。 三、FTPServer搭建 1、关闭防火墙 systemctl stop firewalld or 通过21和20…

C/C++ 进阶(5)二叉平衡搜索树(AVL树)

个人主页:仍有未知等待探索-CSDN博客 专题分栏:C 目录 一、概念 二、平衡因子 三、操作 插入 旋转 左单旋 右单旋 左右双旋 右左双旋 一、概念 二叉平衡搜索树又称AVL树,是一种特殊的二叉搜索树。一般的二叉搜索树在遇到数据有序时&…

【MySQL】sql语句之库操作

序言 在上篇文章学习当中,我们认识了数据库的相关概念,以及MySQL的框架和基本使用等内容,总之对数据库有了一个大致的认识,那么本篇文章将开始关于sql语句的学习,本文主要是关于库的属性和操作的内容,简单可…

2024网络与信息安全管理员职工职业技能竞赛re0220164094

main部分,就是要逆这部分shellcode,程序把data段里面的东西复制到bss段去执行,期间包含解码操作。 v19 0;puts("Please input your flag: ");__isoc99_scanf("%s", s);if ( strlen(s) ! 38 ){puts("Wrong length!&…

yolov5模型结构与构建原理

一.yolov5模型结构与构建原理 修改模型结构,全部在models文件夹下面 models/common.py (加入新增网络细节) models/yolo.py (设定网络结构传参细节) models/##.yaml (修改模型结构配置文…

数字信号处理实验四:IIR数字滤波器设计及软件实现

一、实验目的 1. 掌握MATLAB中进行IIR模拟滤波器的设计的相关函数的应用; 2. 掌握MATLAB的工具箱中提供的常用IIR数字滤波器的设计函数的应用; 3.掌握MATLAB的工具箱中提供的模拟滤波器转数字滤波器的相关的设计函数的应用。 二、实验内容 本实验为…

s32k314【入门新手篇】-开发环境安装【ds32开发平台】

软件包下载 登录nxp官网下载:https://www.nxp.com/ 然后输入关键字:S32 查看 下载安装包 以上三步请先注册好并登录你的个人账号 下载完之后如下: 软件安装 eb安装并激活【试用版】 激活 2 安装ds 弹出什么就安装什么就好了。 …

算法设计与分析部分题目解释

目录 第1讲算法引论 作业1-1 1. (单选题, 5分)算法研究领域包括的三个主要方面为( A ) 2. (单选题, 5分)下面说法关于算法与问题的说法错误的是(B)。 3. (单选题, 5分)下面关于程序和算法的说法不正确的是(B)。 4. (单选题,…

[C#]使用OpenCvSharp图像滤波中值滤波均值滤波高通滤波双边滤波锐化滤波自定义滤波

在使用OpenCvSharp进行图像滤波处理时,各种滤波方法都有其特定的用途和效果。以下是对中值滤波、均值滤波、高通滤波、双边滤波、锐化滤波和自定义滤波的详细解释和归纳: 中值滤波(MedianBlur) 原理与作用:中值滤波是…

redis(17):什么是布隆过滤器?如何实现布隆过滤器?

1 布隆过滤器介绍 布隆过滤器(Bloom Filter)是一种空间效率极高的概率型数据结构,用于判断一个元素是否在一个集合中。它基于位数组和多个哈希函数的原理,可以高效地进行元素的查询,而且占用的空间相对较小,如下图所示: 根据 key 值计算出它的存储位置,然后将此位置标…

springCloud中将redis共用到common模块

一、 springCloud作为公共模块搭建框架 springCloud 微服务模块中将redis作为公共模块进行的搭建结构图&#xff0c;如下&#xff1a; 二、redis 公共模块的搭建框架 如上架构&#xff0c;代码如下pom.xml 关键代码&#xff1a; <dependencies><!-- SpringBoot Boo…

Pycharm 添加内容根

解决问题&#xff1a;包未能被正常引入时

【WRF调试运行第一期】安装WRF模型所需平台

WRF实践实操第一期&#xff1a;安装WRF模型所需平台 1 操作系统2 先决条件软件3 程序流&#xff08;Program Flow&#xff09;4 文件说明软件安装1-Cygwin参考 安装 WRF&#xff08;Weather Research and Forecasting&#xff09;模型需要准备适当的硬件和软件平台。 相关介绍可…

【计算机毕设】基于SpringBoot的中小企业设备管理系统设计与实现 - 源码免费(私信领取)

免费领取源码 &#xff5c; 项目完整可运行 &#xff5c; v&#xff1a;chengn7890 诚招源码校园代理&#xff01; 1. 研究目的 在中小企业中&#xff0c;设备管理是确保生产和运营效率的重要环节。传统的设备管理通常依赖于手工记录和人工管理&#xff0c;容易导致数据不准确、…

全球首款AR电脑上线,可投影100英寸屏幕

近日&#xff0c;Sightful公司推出了一款名为Spacetop G1的革命性笔记本电脑&#xff0c;将AR技术与传统笔记本电脑巧妙融合&#xff0c;打造出令人惊叹的全新办公体验。 全球首款AR电脑上线&#xff0c;可投影100英寸屏幕 不同于传统笔记本电脑依赖物理屏幕显示内容&#xff0…

C#WPF数字大屏项目实战11--质量控制

1、区域划分 2、区域布局 3、视图模型 4、控件绑定 5、运行效果 走过路过&#xff0c;不要错过&#xff0c;欢迎点赞&#xff0c;收藏&#xff0c;转载&#xff0c;复制&#xff0c;抄袭&#xff0c;留言&#xff0c;动动你的金手指&#xff0c;财务自由

OJ题目【栈和队列】

题目导入 栈&#xff1a; 题目一&#xff1a;有效的括号题目二&#xff1a;用栈实现队列 队列 题目&#xff1a;实现循环队列 栈 题目一 有效的括号 题目要求 给定一个只包括 ‘(’&#xff0c;‘)’&#xff0c;‘{’&#xff0c;‘}’&#xff0c;‘[’&#xff0c;‘…

四川汇聚荣聚荣科技有限公司正规吗?

在当今数字化时代&#xff0c;科技公司如雨后春笋般涌现&#xff0c;而四川汇聚荣聚荣科技有限公司作为其中的一员&#xff0c;其正规性自然成为外界关注的焦点。接下来的内容将围绕这一问题展开深入探讨。 一、公司概况四川汇聚荣聚荣科技有限公司是一家位于成都的高新技术企业…