Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
wpbullet — 面向WordPress(及PHP)的静态代码分析 | Kitploit
工具/GitHubGitHub/webarx-security/wpbullet
静态代码分析 (SAST)漏洞分析代码分析Web安全
GitHubwebarx-security/wpbullet

wpbullet

面向WordPress(及PHP)的静态代码分析

查看仓库
239453年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

alt text

wpBullet Build Status Python 2.x|3.x License

一个针对 WordPress 插件/主题(以及 PHP)的静态代码分析工具

安装

只需克隆仓库,安装依赖并运行脚本

  • $ git clone https://github.com/webarx-security/wpbullet wpbullet
  • $ cd wpbullet
  • $ pip install -r requirements.txt
  • $ python wpbullet.py

使用

可用选项:

root@kitploit:~
--path (必填) 系统路径或下载 URL 
示例:
--path="/path/to/plugin"
--path="https://wordpress.org/plugins/example-plugin"
--path="https://downloads.wordpress.org/plugin/example-plugin.1.5.zip"

--enabled (可选) 仅检查指定的模块,例如 --enabled="SQLInjection,CrossSiteScripting"
--disabled (可选) 不检查指定的模块,例如 --disabled="SQLInjection,CrossSiteScripting"
--cleanup (可选) 远程下载插件后自动删除 .temp 文件夹内容(布尔值)
--report (可选) 将结果以 JSON 格式保存到 reports/ 目录(布尔值)

$ python wpbullet.py --path="/var/www/wp-content/plugins/plugin-name"

创建模块

创建模块非常灵活,允许为每个模块重写 BaseClass 的方法,也可以创建自己的方法

Modules 目录中的每个模块都实现了 core.modules.BaseClass 的属性和方法, 因此每个模块必需的参数是 BaseClass

创建后,模块需要在 modules/__init__.py 中导入。模块和类名必须一致 以确保模块能够被加载。

如果你提交拉取请求以添加新模块,请同时提供该模块的单元测试。

模块模板

Modules/ExampleVulnerability.py

root@kitploit:~
from core.modules import BaseClass


class ExampleVulnerability(object):

    # Vulnerability name
    name = "Cross-site Scripting"

    # Vulnerability severity
    severity = "Low-Medium"

    # Functions causing vulnerability
    functions = [
        "print"
        "echo"
    ]

    # Functions/regex that prevent exploitation
    blacklist = [
        "htmlspecialchars",
        "esc_attr"
    ]

重写正则匹配模式

正则模式在 core.modules.BaseClass.build_pattern 中生成,因此可以在每个模块类中重写。

Modules/ExampleVulnerability.py

root@kitploit:~
import copy


...
# Build dynamic regex pattern to locate vulnerabilities in given content
def build_pattern(self, content, file):
    user_input = copy.deepcopy(self.user_input)

    variables = self.get_input_variables(self, content)

    if variables:
        user_input.extend(variables)

    if self.blacklist:
        blacklist_pattern = r"(?!(\s?)+(.*(" + '|'.join(self.blacklist) + ")))"
    else:
        blacklist_pattern = ""

    self.functions = [self.functions_prefix + x for x in self.functions]

    pattern = r"((" + '|'.join(self.functions) + ")\s{0,}\(?\s{0,1}" + blacklist_pattern + ".*(" + '|'.join(user_input) + ").*)"
    return pattern

测试

运行单元测试:$ python3 -m unittest

下载工具