BASHACKS(1)
๐ BASHACKS(1) ๐
User Commands โ like, the whole bashacks manual, bestie, and it's giving absolute legend energy โจ
โจ NAME โจ
bashacks โ a collection of useful bash functions for programmers ๐ซถ
๐ธ DESCRIPTION ๐ธ
So basically: Bashacks Is a collection of Bash functions for UNIX systems, designed to simplify low-level operations. Ideal for programmers, security analysts, and users seeking concise commands, enhancing script readability and productivity. ๐
Likeโฆ it's the bestie that makes your low-level life cute and short instead of a 400-character one-liner you'll forget by Friday. No cap. ๐
๐ฆ SYNOPSIS ๐ฆ
bashacks [OPTIONS] ARGUMENTS
๐ OPTIONS ๐
-h,--helpโ Display help message and exit. (Your "hey queen, what do you do" button ๐)-v,--versionโ Display version information and exit. (For when you need to know which era of slay you're running โญ)
๐ USAGE ๐
The following Bashacks functions are available. Type the function name and press TAB to auto-complete:
Examples of Options : bh_"TAB"
bh_asciitable bh_cmd_sha256 bh_hex2dec bh_rot13 bh_str2hexr
bh_asmgrep bh_cmd_sha512 bh_hex2str bh_rotall bh_strxor
bh_asminfo bh_cmd_wget bh_hexcalc bh_secretfile bh_unshort
bh_bin2dec bh_dec2asc bh_hostcalc bh_sharefile bh_urldecode
bh_bin2ip bh_dec2bin bh_ip2bin bh_skel_c bh_urlencode
bh_bkp bh_dec2hex bh_ipinfo bh_skel_go bh_utf8table
bh_charcalc bh_epoch bh_ipisblocked bh_skel_latex bh_wgetr
bh_cmd_disasm bh_findmime bh_md5rename bh_skel_python bh_zerostring
bh_cmd_md5 bh_hashes bh_myip bh_skel_yara bh_zipmal
bh_cmd_sed_ext bh_hex2bin bh_replacestring bh_str2dec
bh_cmd_sha1 bh_rot bh_str2hex
lowkey the tab-completion alone is worth it, iykyk โจ
๐ CONTENTS ๐
The Bashacks pack is organized into several subcategories for easy location of specific functions. Each subcategory addresses a set specific functionalities. Below the main subcategories are available.
These subcategories help organize the package's functionalities, making it easier for users to find and use tools wanted. ๐ง
๐ Crypto
Functions related to cryptography and hash manipulation. (the secret-keeping girlies)
bh_rotโ Encrypts/Decrypts a string with the Caesar Cipher usingnshifts to the right.bh_strxorโ Calculates the exclusive OR of each character in a string with a key.
For more details, see: file:///usr/share/doc/bashacks-doc/html/crypto.html
๐ Filesystem
This section generally contains functions for file manipulation. (files, but make it organized ๐)
bh_bkpโ Performs a quick backup of the file using the current date.bh_findmimeโ Finds files by MIME type.bh_hashesโ Generates themd5,sha1, andsha256message digest of the file or list of files.bh_md5renameโ Converts the filename to the equivalentmd5hash.bh_secretfileโ Use it to compress and send files, automatically generating a password.bh_sharefileโ Loads a file and provides a unique URL to access it without a password.bh_zipmalโ Compresses the file inzipformat with password protection. The password is"infected".
For more details, see: file:///usr/share/doc/bashacks-doc/html/filesystem.html
๐งฎ Math
Mathematical operations functions. (numbers girlies, rise ๐ซถ)
bh_bin2decโ Converts binary to decimal.bh_charcalcโ Performs operations with characters (char).bh_dec2binโ Converts decimal to binary.bh_dec2hexโ Converts decimal to hexadecimal.bh_hex2binโ Converts hexadecimal to binary.bh_hex2decโ Converts hexadecimal to decimal.bh_hexcalcโ In the same way asbh_charcalc, however, works here withhexdigits.
For more details, see: file:///usr/share/doc/bashacks-doc/html/math.html
๐ Net
Network operations and related tools. (the internet is literally right there โจ)
bh_bin2ipโ Convert a binary string into a network IP address.bh_hostcalcโ Enter a network CIDR mask and determine the number of hosts.bh_ip2binโ Convert a network IP address into a binary string.bh_ipisblockedโ Checks if an IP address is blocked by several security vendors, returning[T]if positive and[F]if opposite.bh_ipinfoโ Queriesipinfo.ioand returns basic information about an address.bh_myipโ Returns the external IP address of your network connection.bh_unshortโ Reveals the real URL behind shortened links.bh_wgetrโ Operates recursively, building on a previous instance ofwget.
For more details, see: file:///usr/share/doc/bashacks-doc/html/net.html
๐งโ๐ป Programming
Session for the creation of facilitators for development in cli (skeletons, but the cute kind ๐)
bh_skel_cโ Generates on the standard output a"C"skeleton.bh_skel_goโ Generates on the standard output a"go"skeleton.bh_skel_latexโ Generates on the standard output a"LaTeX"skeleton.bh_skel_pythonโ Generates on the standard output a"python"skeleton.bh_skel_yaraโ Generates on the standard output a"yara"skeleton.
For more details, see: file:///usr/share/doc/bashacks-doc/html/programming.html
๐ Reversing
Reverse engineering utilities (main character energy for binaries ๐)
bh_asmgrepโ With the binary, attempts to find assembly instructions and prints4lines around.bh_asminfoโ Displays information about assembly instructions. Internet connection is required for help.bh_replacestringโ Finds and replaces occurrences of a string in the file.bh_zerostringโ Replaces occurrences with zero bytes in a block or a common file.
For more details, see: file:///usr/share/doc/bashacks-doc/html/reversing.html
๐ String
Functions for string manipulation. (the OG girlypop category fr fr)
bh_asciitableโ Displays the ASCII table in the terminal.bh_dec2ascโ Equivalent in ASCII for decimal numbers.bh_epochโ Converts a Unix epoch timestamp to a human-readable date and time.bh_hex2strโ Converts one or more bytes into a hex string.bh_str2decโ Converts one or more bytes to their decimal equivalent.bh_str2hexโ Converts a string to its hex byte equivalent for each character (hex string).bh_str2hexrโ Converts a string to its reversed hexadecimal equivalent.bh_urldecodeโ Decodes strings to web standard human-readable format.bh_urlencodeโ Encodes strings to web standard format.bh_utf8tableโ Displays the UTF-8 table.
For more details, see: file:///usr/share/doc/bashacks-doc/html/string.html
โจ EXAMPLES โจ
ok bestie this is the good part, the demo reel, the show-and-tell ๐ every single one of these is copy-pasteable and every output shown is exactly what you'd see. no cap.
๐ bh_rot [int] [string]
usage:
$ bh_rot 3 terra
whuud
๐ bh_strxor [key] [string]
usage:
$ bh_strxor 15 'hack'
gnld
๐ bh_bkp [filename]
usage:
$ bh_bkp bashacks.sh
$ ls -1
bashacks.sh
bashacks.sh.20160122
๐ฆ bh_findmime -[type] [directory]
usage:
$ bh_findmime -elf /usr/bin
/usr/bin/[
/usr/bin/411toppm
๐ฅ bh_hashes [filename or list of files]
usage:
$ bh_hashes bashacks.sh
5dab37cac730088fd959f8292636fc9b bashacks.sh
38be74a4e710a3eeb24b4fa2015cea990d4eda67 bashacks.sh
587b713bb31e3bf32de0b734805c3dd247f49a14cd9e9a5f35008e4f620d3f82 bashacks.sh
three hashes, three algorithms, one file, zero effort ๐
๐ bh_md5rename [filename or list of files]
usage:
$ touch ment.bin
$ bh_md5rename ment.bin
$ ls
d41d8cd98f00b204e9800998ecf8427e
not me renaming your file to its own md5 sum, iconic behaviour fr fr ๐ซถ
๐ bh_zipmal [filename]
usage:
$ bh_zipmal file.txt
adding: file.txt (deflated 69%)
-rw-rw-r-- 1 user user 577 mar 29 10:43 file.zip
password: infected
the password is literally infected, that's the whole bit, slay.
โญ bh_bin2dec [binary]
usage:
$ bh_bin2dec 1111111
๐ธ bh_charcalc [char/string] [operator] [number]
usage:
$ bh_charcalc A + 2
C
$ bh_charcalc A \* 255
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
ok the second one is so extra and i'm obsessed, look at all those A's ๐ญ
๐ง bh_dec2bin [decimal]
usage:
$ bh_dec2bin 255
11111111
๐ bh_dec2hex [decimal]
$ bh_dec2hex 10
a
๐ฆ bh_hex2dec [one or more hex digit]
usage:
$ bh_hex2dec A
10
โจ bh_hexcalc [hex digit] [operator] [hex digit]
usage:
$ bh_hexcalc A \* 2
0xa0
๐ bh_bin2ip [binary string]
usage:
$ bh_bin2ip 00001010.00001010.00000000.00000001
10.10.0.1
๐ bh_hostcalc [network/prefix]
usage:
$ bh_hostcalc 192.168.1.0/24
254
๐ฅ bh_ipisblocked [ipaddress]
usage:
$ bh_ipisblocked 77.xxx.xx.xx
== 77.xxx.xx.xx ==
[F] TALOS
[F] Malc0de
[F] Projecthoneypot.org
[F] blocklist.de
[T] Alienvault
[F] SANS-TOPSOURCE
[T] = true, [F] = false, and the vibe check on that Alienvault line is giving caught in 4k ๐
๐ซถ bh_unshort [url]
usage:
$ bh_unshort https://bit.ly/3example
http://websitedoctors.blogspot.com/2010/11/best-search-engine-optimization-seo.html
revealing the real url under the cute little shortener, main character energy.
๐ธ bh_wgetr [url]
usage:
$ bh_wgetr http://www.mentebinaria.com.br/artigos/0x1e/0x1e-maqengrevwin.html
www.mentebinaria.com.br/art 100%[==========================================>] 8.73K --.-KB/s in 0s
www.mentebinaria.com.br/rob 100%[==========================================>] 361 --.-KB/s in 0s
www.mentebinaria.com.br/art 100%[==========================================>] 66.18K 132KB/s in 0.5s
$ ls -1
www.mentebinaria.com.br
$ ls -1 www.mentebinaria.com.br/artigos/0x1e/
0x1e-maqengrevwin.html
desktop.png
it recursed, it pulled the html and desktop.png, it ate and left no crumbs ๐
๐ bh_ipinfo [ipaddress]
usage:
$ bh_ipinfo 8.8.8.8
{
"ip": "8.8.8.8",
"hostname": "dns.google",
"anycast": true,
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.4056,-122.0775",
"org": "AS15169 Google LLC",
"postal": "94043",
"timezone": "America/Los_Angeles",
"readme": "https://ipinfo.io/missingauth"
}
๐ bh_skel_c
usage:
$ bh_skel_c
#include <stdio.h>
int main(int argc, char *argv[]) {
return 0;
}
๐ฆ bh_skel_go
usage:
$ bh_skel_go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
โญ bh_skel_latex
usage:
$ bh_skel_latex
\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\author{}
\title{}
๐ง bh_skel_python
usage:
$ bh_skel_python
#!/usr/bin/env python
# *-* coding: utf-8 *-*
if __name__ == '__main__':
๐ bh_skel_yara
usage:
$ bh_skel_yara
rule test {
meta:
author = "username"
description = ""
date = "2026-03-29"
ref = ""
hash = ""
strings:
$a = "test" ascii wide
condition:
all of them
}
five whole skeletons, zero typing, we love a head start ๐
๐ฅ bh_asmgrep [asm instruction] [binary path]
usage:
$ bh_asmgrep mov /bin/ls
409f2e:66 90 : xchg %ax,%ax
409f30:80 7c 13 ff 2f : cmpb $0x2f,-0x1(%rbx,%rdx,1)
409f35:48 8d 42 ff : lea -0x1(%rdx),%rax
409f39:75 08 : jne 409f43 <__sprintf_chk@plt+0x7783>
409f3b:48 89 c2 : mov %rax,%rdx
409f3e:48 39 d5 : cmp %rdx,%rbp
409f41:75 ed : jne 409f30 <__sprintf_chk@plt+0x7770>
409f43:48 83 c4 08 : add $0x8,%rsp
--
๐ bh_asminfo [asm instruction]
usage:
$ bh_asminfo push
push
|Code |Mnemonic |Description |
|FF /6 |PUSH r/m16 |Push r/m16 |
|FF /6 |PUSH r/m32 |Push r/m32 |
|50+rw |PUSH r16 |Push r16 |
|50+rd |PUSH r32 |Push r32 |
|6A |PUSH imm8 |Push imm8 |
๐ซถ bh_replacestring [file] [string to search] [string to replace]
usage:
$ hexdump -C MB_DEV
00000690 2e 00 54 00 58 00 54 00 2e 00 00 00 73 00 77 00 |..T.X.T.....s.w.|
000006a0 e5 45 53 54 45 54 7e 31 53 57 58 20 00 65 a1 9b |.ESTET~1SWX .e..|
000006b0 8b 54 8b 54 00 00 a1 9b 8b 54 00 00 00 00 00 00 |.T.T.....T......|
000006c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00005e00 4d 65 6e 74 65 42 69 6e 61 72 69 61 0a 00 00 00 |MenteBinaria....|
00005e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
๐ธ bh_zerostring [file] [string to replace]
usage:
$ cp /usr/bin/true /tmp/true_test
$ bh_zerostring /tmp/true_test "error"
5+0 records in
5+0 records out
5 bytes copied
โญ bh_epoch [timestamp]
usage:
$ bh_epoch 1743249600
sรกb 29 mar 2026 09:00:00 -03
๐ bh_dec2asc [decimal]
usage:
$ bh_dec2asc 65
A
๐ฆ bh_hex2str [hex string]
usage:
$ bh_hex2str '72 6f 63 6b'
rock
๐ bh_str2hex [-x] [-0x] [-c] [string]
usage:
$ bh_str2hex 'Fernando'
46 65 72 6e 61 6e 64 6f
$ bh_str2hex -0x 'Fernando'
0x46 0x65 0x72 0x6e 0x61 0x6e 0x64 0x6f
๐ bh_str2hexr [string]
usage:
$ bh_str2hexr "hello"
6f 6c 6c 65 68
๐ฅ bh_urldecode [encoded string]
usage:
$ bh_urldecode '%2fzzz%21%40%2e%23'
/zzz!@.#
๐ง bh_urlencode [string]
usage:
$ bh_urlencode '/zzz!@.#'
%2fzzz%21%40%2e%23
see how those two are literally each other's mirror? ๐ the way that bh_urldecode and bh_urlencode are besties, iykyk ๐
๐ SEE ALSO ๐
want more lore about bashacks? go read:
๐ AUTHOR ๐
developed by Fernando Merces <contato@mentebinaria.com.br>
this manual page was written by Josenilson Ferreira da Silva <nilsonfsilva@hotmail.com> for the Debian project (but may be used by others).
and that's the whole page, bestie ๐ซถ this little bundle of joy is bashacks 1.5, dated November 2026, and it lives its life as BASHACKS(1) โ now go run something cute in your terminal, you've earned it โจ๐๐
๐ฆ where this page comes from
- ubuntu stonking: bashacks 1.5+git20260330.988ab7e-1 ยท GPL-3.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms