Highlight Your Terminal: a tools design to highlight information on output of terminal
Tags: terminal, shell, bash, highlight
Published: 2024-06-16 18:11:01

[highlight](https://github.com/ReconXSecurityHQ/highlight) is a script to detect and highlight patterns such as URLs, domains, IPv4 addresses, IPv6 addresses, subnets, ports, categories, HTML tags, and more.

## Introduction
In the world of system administration, network management, and development, analyzing log files and text streams is a daily routine. Manually sifting through plain text can be tedious and error-prone. What if you could make important information pop out with color? Enter highlight—a powerful, customizable script that uses awk to highlight specific patterns in your text files.

In this guide, we’ll explore practical use cases of the highlight command to supercharge your terminal experience.

## Why Use highlight?
`highlight` can highlight:

- IPv4 and IPv6 addresses
- Subnet masks
- URLs
- Domains with ports
- Common network ports (e.g., 80/tcp)
- Important script details
- Text inside parentheses
- HTML tags and attributes
- With these capabilities, highlight makes it easier to identify and analyze crucial information in logs and other text streams.


## Usage Examples
Here are some practical use cases to demonstrate how highlight can be used with common tools.

1.**Highlighting Patterns in Log Files**
Logs are essential for troubleshooting and monitoring systems. highlight can make critical information in logs stand out.

```
highlight < /var/log/apt/history.log
```

**Example:**

![](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*QuQ3DMzAxzbL_LPXrt6SVA.png)

In this example, it highlight keys, and other important patterns will be highlighted, making it easier to spot issues or important events in your system logs.

2.**Highlighting Output from nmap**
nmap is a powerful network scanning tool. Highlighting its output can help quickly identify open ports, IP addresses, and more.

```
sudo nmap -sV -sC -Pn hackerone.com | highlight
```

**Example:**

![](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*bBhTF9RyFvyPx0a3NxWuMg.png)

With highlight, the output from nmap scans will be more readable, allowing you to easily see open ports, service details, and potential vulnerabilities.

3.**Highlighting Output from ifconfig**
The ifconfig command displays network interface configuration. Highlighting IP addresses and netmasks can make the output more readable.

```
ifconfig | highlight
```
**Example:**
![](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*UjhLSKNR5ZOAo4fCuPa1qw.png)

4.**Highlighting Output from curl**
curl is used for transferring data with URLs. Highlighting URLs and other critical parts of the output can be very helpful.

```
curl -i -s https://www.hackerone.com | highlight
```
**Example:**

![](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*5-F8phe9URGdug2DMCQHGA.png)

This example makes HTTP headers, HTML tags and other important parts of the curl output stand out, which is useful for debugging web requests or inspecting server responses.

## Conclusion
highlight is a versatile tool that can greatly improve the readability of your terminal output by highlighting important patterns. Whether you are analyzing logs, network configurations, or HTTP responses, highlight can help you quickly spot the information you need.

Give it a try and transform the way you interact with text in your terminal!

Checkout here: [Github](https://github.com/ReconXSecurityHQ/highlight)

Your’re Welcome!