Home

Awesome

Oh My Pentest Report Zsh Theme

ohmy-pentest-report.zsh-theme is a customizable Oh My Zsh theme specifically designed for pentesters, offering a clean and efficient prompt to streamline daily tasks during audits and penetration testing. The theme includes real-time display of the date, time, IP address, current directory, and the result of the last executed command. The inclusion of date and time is particularly useful for reporting, allowing pentesters to clearly track when tests were executed, making it easier to document results. Additionally, the theme provides flexibility for manual or automatic IP configuration, custom symbols, custom command history logging, and other features tailored to enhance a pentester's workflow.

Features

Oh My Zsh Installation

  1. First, make sure you have ZSH installed:
sudo apt install zsh -y
  1. You can set ZSH as the default shell with the following command:
chsh -s $(which zsh)
  1. Once you have ZSH installed and set as the default shell, you can download Oh My Zsh with the following command:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Installation

  1. Clone the repository into your custom themes directory:
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
  1. Set the theme in your .zshrc:
sed -i 's/ZSH_THEME=".*"/ZSH_THEME="ohmy-pentest-report"/' ~/.zshrc
  1. Reload your terminal:
source ~/.zshrc

Usage

By default, both the IP address and date/time display are disabled. You can enable them as needed using the provided commands.

Enable or Disable Date and Time in the Prompt

enabledate

The prompt will now display the date and time in cyan.

disabledate

The date and time will be removed from the prompt.

Enable or Disable IP Address in the Prompt

enableip

The prompt will now display the IP address.

disableip

The IP address will be removed from the prompt.

Set a Specific IP

To manually set an IP:
setip 192.168.1.100
Use an Interface to Get the IP

To get the IP address from a specific network interface:

setip eth0
Get the Public IP (Useful for Web Assessments or External Pentests)

You can display the public IP address, which is particularly useful for web assessments or external penetration testing:

setip public

The public IP will be refreshed automatically every 15 minutes.

Enable or Disable All

Enable IP and Date/Time in Prompt:

enableall

Disable IP and Date/Time in Prompt:

disableall

Custom Command History Logging

All executed commands are logged to ~/.pentest_history in the format DATE - IP - COMMAND, regardless of whether the date and IP are displayed in the prompt. This feature is particularly useful for reporting and keeping track of activities during a penetration test.

28/10/23 16:38 - 192.168.1.100 - nmap -sV target.com

Customizing the Prompt to Two Lines

The theme allows you to switch to a two-line prompt format, where the command input appears on a new line below the prompt information.

# Control to use a two-line prompt (disabled by default)
twolines=true  # Set to true to enable two-line prompt

Note: There are no commands provided to toggle this setting. You need to edit the theme file manually to change it.

Additional Customization

You can further customize the prompt by editing the theme file and modifying variables such as the date format, symbol styles, and colors.

Screenshots

Here's an example of how the prompt looks:

Prompt Example

Contributions

Contributions, issues, and feature requests are welcome! Feel free to check out the issues page if you want to contribute.