Skip to main content

linktools toolkit

Project description

linktools-common

Linktools 通用工具包,提供环境管理、文件搜索及远程工具下载执行等功能(命令前缀 ct-)。

开始使用

安装

python3 -m pip install -U linktools-common

# 安装完整功能(包含所有可选依赖,如 lief 二进制解析支持)
python3 -m pip install -U "linktools-common[all]"

# 安装 GitHub 最新开发版
python3 -m pip install --ignore-installed \
  "linktools@ git+https://github.com/linktools-toolkit/linktools.git@master#subdirectory=linktools" \
  "linktools-common@ git+https://github.com/linktools-toolkit/linktools.git@master#subdirectory=linktools-common"

命令列表

ct
├── env     — 管理和配置 Linktools 环境
├── grep    — 使用正则表达式搜索匹配文件内容
└── tools   — 直接从远程 URL 下载并执行工具

👉 ct-env

环境配置管理命令,用于生成 alias 脚本、配置 Java 环境变量等。

常用命令
# 生成 alias 脚本,常配合 ~/.bashrc 等文件使用
$ ct-env --silent alias --shell bash

# 生成配置 Java 环境变量脚本(可通过 https://sap.github.io/SapMachine/#download 查找 LTS 版本号)
$ ct-env --silent java 17.0.11 --shell bash

# 进入已初始化相关环境变量的 shell
$ ct-env shell

# 清除项目中 7 天以上未使用的缓存文件
$ ct-env clean 7

~/.bashrc~/.zshrc 中添加:

# 自动注册所有 linktools 命令及自动补全
eval "$(python3 -m linktools.cli.env alias --shell bash)"

# 配置全局 Java 环境
eval "$(ct-env --silent java 17.0.11 --shell bash)"

👉 ct-grep

类似 Linux 中的 grep,使用正则表达式匹配文件内容,额外支持解析 ZIP、ELF 等格式。

效果预览

ct-grep


👉 ct-tools

读取配置文件,自动下载并执行对应工具,内置声明了 adb、jadx、apktool、baksmali 等常用工具。

常用命令

所有声明的工具可通过配置文件查看,以下以 apktool 为例:

# 初始化并执行 apktool 命令
$ ct-tools apktool -h

# 查看 apktool 相关配置
$ ct-tools --config apktool

# 只下载不执行
$ ct-tools --download apktool

# 清除 apktool 相关缓存文件
$ ct-tools --clear apktool

# 后台运行 apktool
$ ct-tools --daemon apktool

# 修改工具版本号
$ ct-tools --set version=2.5.0 apktool

常用 alias 配置:

alias apktool="ct-tools apktool"
alias burpsuite="ct-tools burpsuite"
alias jadx="ct-tools --set version=1.5.0 jadx-gui"  # 指定 jadx 版本号

相关链接

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

linktools_common-0.9.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linktools_common-0.9.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file linktools_common-0.9.1.tar.gz.

File metadata

  • Download URL: linktools_common-0.9.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for linktools_common-0.9.1.tar.gz
Algorithm Hash digest
SHA256 10ed632a36a6f15b3f25d0ac63952565fa513021bbf3900a29e91e46ba08bbed
MD5 7d83d4c0a32e2abe38761032838a5fb5
BLAKE2b-256 9eb5f65dbc7d81e9263136fb42f394174abd7ab146de7fd6695bc59ab788c03c

See more details on using hashes here.

File details

Details for the file linktools_common-0.9.1-py3-none-any.whl.

File metadata

File hashes

Hashes for linktools_common-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a2102e274a2a2929d6e013e718d8d3ad6f166c3f9a8fcbd0abd4567ded6fcef
MD5 9475614f3ee309bb138548e89962a1c3
BLAKE2b-256 1eab9ef356be7e44b3f596e2c252132d293ec28951b7ab803d73dcdaee0023c3

See more details on using hashes here.

Supported by

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