If you’re a pentester or work in security audits, you know how important it is to have tools that optimize your workflow and allow you to keep a clear record of your activities. Today we’re going to look at Oh My Pentest Report, a custom theme for Oh My Zsh that I created a few months ago to improve my day-to-day work.
- What is it about?
- Theme installation
- Available commands
- Command logging (~/.pentest_history)
- Customization
- Conclusion
What is it about?
Oh My Pentest Report is an Oh My Zsh theme created with the goal of offering a prompt that is not only visually clear, but also includes practical features for everyday use, such as automatic command logging and dynamic display of relevant information. Among its most notable features are:
- Date and time display: Shows the current date and time, ideal for documenting when certain tests were performed. It’s also useful for knowing how many minutes a command took to execute.
- Dynamic IP address: Allows you to display the IP of a specific interface (like tun0 for VPNs), a manually configured IP, or even the public IP (useful for external audits). The interface IP is checked every 10 seconds in case it changes, and the public IP every minute.
- Command status: Indicates if the last command was successful (white ❯ symbol) or failed (red ❯ symbol), and displays a special symbol (# in yellow) if you’re root, which again turns red if the last command failed.
- Command logging: Automatically saves all executed commands in a ~/.pentest_history file with the format DATE - IP - COMMAND, so you can know all the commands you’ve executed along with their date, time, and IP. The latter in case you’ve configured it, otherwise, the default IP of the eth0 interface will be used.
- Two-line prompt: By default, the prompt is two lines, due to the great length the prompt can have if everything is enabled. Even so, you can easily modify the theme to use a single line.
- Git support: When you access a directory where there’s a Git repository, the branch you’re working on and an asterisk symbol if there are edited files without commits are automatically added to the prompt.
Below, you can see a screenshot showing how the prompt looks with all its features activated:

Additionally, you can edit the default value of some configurations by editing the theme file itself:

Theme installation
If you don’t have ZSH installed and/or set as the default shell, you can do the following:
sudo apt install zsh -y
chsh -s $(which zsh)
If you already have ZSH but don’t have Oh My Zsh, you can install it as follows:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Once you have both, it’s time to install the Oh My Pentest Report theme. The process is very simple and straightforward:
# Clone and install the theme
git clone https://github.com/sikumy/ohmy-pentest-report/ $ZSH_CUSTOM/themes/ohmy-pentest-report
mv $ZSH_CUSTOM/themes/ohmy-pentest-report/ohmy-pentest-report.zsh-theme ~/.oh-my-zsh/themes/ohmy-pentest-report.zsh-theme
# Configure .zshrc
sed -i 's/ZSH_THEME=".*"/ZSH_THEME="ohmy-pentest-report"/' ~/.zshrc
# Add the following command to .zshrc. You need to add it before the line "source $ZSH/oh-my-zsh.sh"
zstyle ':omz:alpha:lib:git' async-prompt force
# Reload the terminal
exec $SHELL
And with that, everything would be ready. You would have the theme active in your terminal.
Available commands
By default, IP and date/time display are disabled to keep the prompt clean, but you can easily activate them with specific commands. Here’s a summary of the most useful commands:
- Enable/Disable Date and Time
enabledate # Shows the date and time in cyan
disabledate # Hides the date and time
- Enable/Disable IP
enableip # Shows the configured IP
disableip # Hides the IP
- Configure IP
setip 192.168.1.100 # Static IP
setip eth0 # Interface IP
setip public # Public IP (updates every minute, you can modify this time in the theme)
- Enable/Disable everything
enableall # Enables IP and date/time
disableall # Disables IP and date/time
Command logging (~/.pentest_history)
As mentioned before, one of the most useful features of Oh My Pentest Report is its automatic command logging system. Each executed command is saved in the ~/.pentest_history file with the format DATE - IP - COMMAND. For example:
28/10/23 16:38 - 192.168.1.100 - nmap -sV target.com
As stated, having this log is very useful for knowing exactly what commands you executed, from which IP, and at what time.
Customization
If you want to adjust the date format, prompt symbols, or colors, you can directly edit the ohmy-pentest-report.zsh-theme file. For example:
- Date Format: You can modify the get_datetime function to change how the date and time are displayed.
- Symbols: You can change the symbols for successful command (cmd_symbol_success), failed (cmd_symbol_fail), or root user (cmd_symbol_root) and failed root user (cmd_symbol_root_fail) by editing their respective functions.
- Colors: You can also adjust the color codes so the prompt adapts to your preferences.
Conclusion
In conclusion, Oh My Pentest Report is a theme I made to improve my daily work. The clean prompt, its practical features, and its automatic command logging make it perfect for staying organized during audit activities.
You can find the theme in the following repository, any star ⭐ is appreciated:
Any Pull Request with improvements is welcome :)
That said, Happy Hacking!