Skip to main content

Analyzer for files and urls

Project description

xanalyzer

静态分析文件和url,python3下运行。

  1. 文件
    • md5/sha256
    • 文件类型
    • 文件大小
    • 字符串扫描
    • PE文件
      • PE大小
      • 编译时间
      • pdb路径
      • 版本信息
      • 证书验证
      • 节区名称
      • 查壳
      • 资源段扫描
    • ELF文件
      • ELF大小
      • 查壳
    • 建议使用的工具
  2. url(website)
    • 域名解析ip
    • 获取robots.txt文件
    • 站内链接扫描(--deep)
    • 站内子域名扫描(--deep)

安装

方法1 - 使用pipx安装:

pipx install xanalyzer
# 还可以用来升级,但是不能检查升级
pipx upgrade xanalyzer

pipx: https://pypa.github.io/pipx/

方法2 - 从源码安装:

git clone https://github.com/qux-bbb/xanalyzer
cd xanalyzer
python setup.py install

如果系统是 Debian/Ubuntu,需要安装依赖:

sudo apt-get install libmagic1

使用帮助

usage: xanalyzer [-h] (-f FILE [FILE ...] | -u URL | --version) [-s] [--deep]

Process some files and urls.

optional arguments:
  -h, --help            show this help message and exit
  -f FILE [FILE ...], --file FILE [FILE ...]
                        analyze one or more files, can be a folder path
  -u URL, --url URL     analyze the url
  --version             print version info
  -s, --save            save log and data
  --deep                analyze deeply

使用示例

xanalyzer -f hello.exe
xanalyzer -u "https://www.baidu.com/s?wd=hello"

开发

git clone https://github.com/qux-bbb/xanalyzer
cd xanalyzer
virtualenv venv
pip install -r requirements.txt
python setup.py develop

这样之后就可以用pycharm或vscode开发调试了

打包发布

该步骤仅本人使用

打包前确保版本号和CHANGELOG.md已更新

安装依赖并打包:

pip install -r requirements.my.txt
python setup.py sdist bdist_wheel

重新打开一个命令行,转到dist文件夹下本地安装,检查基本功能,举例:

pipx uninstall xanalyzer
pipx install ./xanalyzer-0.2.3.tar.gz
xanalyzer --version
xanalyzer -f ./xanalyzer-0.2.3.tar.gz

在github创建Release

  1. 标题为xanalyzer <version>,如: xanalyzer v0.2.0
  2. 内容基于CHANGELOG.md做一些修改
  3. 将dist文件夹下所有文件传到Release页面
    然后发布即可

将文件传到pypi(需要账号密码)

python -m twine upload --repository pypi dist/*

其它

这个项目的有些功能可能会用到:
https://github.com/mitre/multiscanner

参考链接:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xanalyzer-0.2.6.tar.gz (108.5 kB view hashes)

Uploaded Source

Built Distribution

xanalyzer-0.2.6-py3-none-any.whl (114.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page