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

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

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

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

工具目录

分类

查看所有分类
Loading categories
bashacks — 一组用于在使用 Bash 进行黑客操作时提高生产力的函数。 | Kitploit
工具/GitHubGitHub/merces/bashacks
通用工具加密/解密工具哈希分析脚本与自动化信息收集恶意软件分析
GitHubmerces/bashacks

bashacks

一组用于在使用 Bash 进行黑客操作时提高生产力的函数。

查看仓库
2114355个月前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

bashacks

是什么?

bashacks 是一个 bash 函数集合,对程序员、安全分析师以及需要底层操作的普通用户都很有用。

实际上,bashacks 中并没有真正全新的东西;所有函数都是基于 UNIX 类系统中已有的软件编写的。但它让你能够用更简短的命令来完成通常需要多个命令才能完成的任务。

要求

  • bash >= 4
  • bc
  • binutils
  • coreutils
  • curl
  • file
  • grep
  • hexdump
  • html2text
  • perl
  • sed
  • wget
  • xxd
  • zip

构建

使用 make 命令生成一个包含所有函数的单一文件,然后 source 它:

root@kitploit:~
make
source bashacks.sh

就这样。你现在可以在新终端中输入 bh_ 并按下 Tab 键来查看可用的函数。

如果想使其持久有效,请将其添加到你的 ~/.bash_profile 中:

root@kitploit:~
echo "source $(pwd)/bashacks.sh" >> ~/.bash_profile

文档

有一些文档,但已经过时了。欢迎提交 PR!

用法

当前时间的 Epoch 时间戳是多少?

root@kitploit:~
$ bh_epoch
1522324129

对 'f' 按字母顺序加 4

root@kitploit:~
$ bh_charcalc f + 4
j

查看我的外部 IP 地址

root@kitploit:~
$ bh_myip
177.212.113.13

创建一个基础的 C 程序骨架

root@kitploit:~
$ bh_skel_c > hello.c
$ cat hello.c

这将输出:

root@kitploit:~
#include <stdio.h>

int main(int argc, char *argv[]) {


    return 0;
}

计算文件的常见校验和

root@kitploit:~
$ bh_hashes /bin/ip*
387478f58a0669173fb6557d392a58e9 /bin/ip
1dd0f3b100bd6efc4664da0cdefff801d7d2efd8 /bin/ip
1d418ae3a767280c7fc6026a25e5bb9774c0e8afc7b3387b547765b62cbe578f /bin/ip
78868acd29e4a33194fb786f6589d3d1 /bin/ipcmk
8c22a129ff4b5748cc62222a93ba8471d7fdce19 /bin/ipcmk
34a068d7f85e85746b3fc98502fa96a734cc51f3a9d49cad92911e8f239bd9c9 /bin/ipcmk
69c2bedc20e77c039912c9d5e7af33db /bin/ipcrm
7992a936b28359d7f087a448d2b8a2418ef4f112 /bin/ipcrm
cded383eb3b74467409c1731c2804350fe3d1123bdac7304c1c6f3af9e7976f7 /bin/ipcrm
499f17765c0aa55ac99739c9bcac1d0c /bin/ipcs
c476949e77ef8710398fd8ec4f78c8cf1d76a420 /bin/ipcs
33c77a5b625f4de919f55dc24207645d219a2fde2e0b92be27c5cda8c662cd72 /bin/ipcs
6a738c5c2506f7e87c9458e0c3df378f /bin/iptables-xml
ba97af2e429aca6beb5a2b8861e370bbf874dee9 /bin/iptables-xml
cb8c10461da5247e8d6d63a123ba563df95ae1e78f29e1717eb8bb02c2ca045b /bin/iptables-xml

按 MIME 类型查找文件(忽略文件扩展名):

root@kitploit:~
$ bh_findmime -elf /bin | head
/bin/[
/bin/addpart
/bin/appres
/bin/apt
/bin/apt-cache
/bin/apt-cdrom
/bin/apt-config
/bin/apt-extracttemplates
/bin/apt-ftparchive
/bin/apt-get

你可以将结果通过管道传给 xargs 以快速计算校验和:

root@kitploit:~
$ bh_findmime -pe ~/Downloads/ | xargs shasum
d9e49c4209087170e36cbef689d96240d736cf3b  /Users/menteb/Downloads/CSCWCNG.dll
50dfeea02e89f41caf52df152c7cb923c667bffc  /Users/menteb/Downloads/Receitanet-1.10.exe
86a5f89d43ab11456fb817aeceb14b83cc6c2608  /Users/menteb/Downloads/Xojo2017r3Setup.exe.opdownload

将字符串转换为十六进制,支持多种输出格式

root@kitploit:~
$ bh_str2hex mentebinaria
6d 65 6e 74 65 62 69 6e 61 72 69 61
root@kitploit:~
$ bh_str2hex -x mentebinaria
\x6d\x65\x6e\x74\x65\x62\x69\x6e\x61\x72\x69\x61
root@kitploit:~
$ bh_str2hex -c mentebinaria
{ 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x69, 0x61 }

bashacks 提供非常基础的错误处理。如果某个函数没有收到所需的参数,它只会返回 1。

更多功能等你发现。安装试试看吧。:)

已知问题

字符串转义

在某些字符串函数中,你必须转义特殊字符,因为 bash 会试图解释它们。请看以下使用 bh_strxor 函数的示例:

root@kitploit:~
$ bh_strxor 0x41 fernando
'$3/ /%.

$ bh_strxor 0x41 "'\$3/ /%." # 双引号内的字符串,美元符号已转义
fernando

Zsh 支持

许多 bashacks 函数使用了 bash 的词分割特性,因此在 Zsh 中默认无法工作。不过,你可以通过以下命令配置 Zsh 启用词分割:

root@kitploit:~
$ setopt sh_word_split

然后应该就能正常工作了。

下载工具