Top Related Projects
A collection of custom security tools for quick needs.
Scripted Local Linux Enumeration & Privilege Escalation Checks
PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)
Fetch known URLs from AlienVault's Open Threat Exchange, the Wayback Machine, and Common Crawl.
A wrapper around grep, to help you grep for things
Fast and customizable vulnerability scanner based on simple YAML based DSL.
Quick Overview
htrace.sh is a shell script designed for debugging and analyzing HTTP/HTTPS connections, requests, and responses. It provides detailed information about the entire HTTP(S) communication process, including DNS resolution, SSL/TLS handshake, and full request/response data.
Pros
- Comprehensive analysis of HTTP/HTTPS connections
- Supports various HTTP methods and custom headers
- Provides detailed SSL/TLS information
- Easily customizable and extendable
Cons
- Requires multiple external dependencies
- Limited to command-line interface
- May be overwhelming for beginners due to the amount of information provided
- Performance may be slower compared to dedicated HTTP clients
Code Examples
As htrace.sh is a shell script and not a code library, there are no code examples to provide. Instead, here are some example usage commands:
# Basic usage
htrace.sh example.com
# Specify HTTP method and custom headers
htrace.sh -H "User-Agent: Custom" -X POST example.com
# Use a specific DNS server
htrace.sh --resolver 8.8.8.8 example.com
Getting Started
To get started with htrace.sh, follow these steps:
-
Clone the repository:
git clone https://github.com/trimstray/htrace.sh.git
-
Navigate to the project directory:
cd htrace.sh
-
Make the script executable:
chmod +x htrace.sh
-
Run the script:
./htrace.sh example.com
Note: Ensure that all required dependencies are installed on your system before running the script.
Competitor Comparisons
A collection of custom security tools for quick needs.
Pros of pentest-tools
- Broader scope: Offers a collection of various penetration testing tools
- More versatile: Includes scripts for different aspects of security testing
- Active development: Regularly updated with new tools and features
Cons of pentest-tools
- Less focused: Not specialized in a single area like htrace.sh
- Potentially overwhelming: Large number of tools may be difficult to navigate
- Varying quality: Some tools may be more polished than others
Code Comparison
htrace.sh (Bash):
_init_cmd() {
local _FUNCTION_ID="_init_cmd"
local _STATE=0
# shellcheck disable=SC2034
_cmd=("$@")
pentest-tools (Python):
def doCheckUrl( url ):
t_urlparse = urlparse(url)
u = t_urlparse.scheme + '://' + t_urlparse.netloc
if u != url:
return False
return True
Both repositories provide valuable tools for security professionals, but they serve different purposes. htrace.sh focuses on HTTP/HTTPS troubleshooting and analysis, while pentest-tools offers a broader range of penetration testing utilities. The choice between them depends on the specific needs of the user and the type of security testing being performed.
Scripted Local Linux Enumeration & Privilege Escalation Checks
Pros of LinEnum
- More comprehensive system enumeration, covering a wider range of system information
- Easier to use for beginners with less configuration required
- Actively maintained with regular updates and contributions
Cons of LinEnum
- Less focused on network tracing and HTTP-specific analysis
- May produce more verbose output, requiring more time to analyze results
- Limited customization options compared to htrace.sh
Code Comparison
LinEnum (bash):
#!/bin/bash
thorough=0
header() {
echo "[-] Debug Info"
echo "[*] Thorough tests = $thorough"
echo "[*] Current user = $USER"
echo "[*] Current user ID = $UID"
echo "[*] Current hostname = $HOSTNAME"
}
htrace.sh (bash):
#!/usr/bin/env bash
readonly _init_directory=$(dirname "$(readlink -f "$0")")
if [[ "$1" == "__init__" ]] ; then
init_state="0"
. "${_init_directory}/src/settings"
. "${_init_directory}/src/helpers"
Both projects are written in Bash, but htrace.sh has a more modular structure with separate files for settings and helpers. LinEnum focuses on system enumeration, while htrace.sh is tailored for HTTP tracing and analysis. LinEnum's code is more straightforward, making it easier for beginners to understand and modify, while htrace.sh offers more advanced features and customization options for experienced users.
PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)
Pros of PEASS-ng
- More comprehensive privilege escalation and system enumeration tool
- Supports multiple operating systems (Linux, Windows, macOS)
- Actively maintained with frequent updates
Cons of PEASS-ng
- Larger codebase, potentially more complex to use and understand
- May generate more noise in output, requiring more analysis
Code Comparison
PEASS-ng (linPEAS.sh):
if [ "$MACPEAS" ]; then
print_title "MacPEAS"
macpeas_show_banner
macpeas_system_information
macpeas_users_information
macpeas_software_information
htrace.sh:
# shellcheck disable=SC2034
_init_cmd=(
"eval"
"command"
"exec"
"source"
)
# shellcheck disable=SC2034
_http_methods=(
"GET"
"HEAD"
"POST"
"PUT"
Summary
PEASS-ng is a more comprehensive tool for privilege escalation and system enumeration, supporting multiple operating systems and receiving frequent updates. However, it may be more complex to use and generate more output to analyze. htrace.sh, on the other hand, is focused specifically on HTTP/HTTPS troubleshooting and analysis, with a simpler codebase but more limited scope. The choice between the two depends on the specific needs of the user and the task at hand.
Fetch known URLs from AlienVault's Open Threat Exchange, the Wayback Machine, and Common Crawl.
Pros of gau
- Written in Go, offering better performance and cross-platform compatibility
- Simpler to use with fewer dependencies
- Focuses specifically on URL discovery from various sources
Cons of gau
- Less comprehensive analysis compared to htrace.sh
- Lacks advanced HTTP tracing and debugging features
- May require additional tools for in-depth security assessments
Code Comparison
htrace.sh:
_init_cmd
_load_config
_get_http_headers
_get_trace_data
gau:
func main() {
urls := make(chan string)
var wg sync.WaitGroup
for i := 0; i < threads; i++ {
wg.Add(1)
go func() {
Summary
htrace.sh is a more comprehensive HTTP debugging tool written in Bash, offering detailed analysis and tracing capabilities. It's ideal for in-depth HTTP investigations but may have a steeper learning curve.
gau is a focused URL discovery tool written in Go, providing efficient performance and ease of use. It's better suited for quick URL enumeration tasks but lacks the advanced HTTP analysis features of htrace.sh.
Choose htrace.sh for detailed HTTP debugging and analysis, or gau for rapid URL discovery and enumeration in web application security assessments.
A wrapper around grep, to help you grep for things
Pros of gf
- Lightweight and focused on pattern matching in files
- Easily extendable with custom patterns
- Fast execution for large sets of files
Cons of gf
- Limited to pattern matching, lacks advanced HTTP tracing features
- No built-in visualization or reporting capabilities
- Requires manual interpretation of results
Code Comparison
gf:
gf xss example.com
htrace.sh:
htrace.sh -u https://example.com -s
Key Differences
gf is a simple tool for finding patterns in files, while htrace.sh is a comprehensive HTTP/HTTPS troubleshooting and profiling tool. gf excels at quickly identifying specific patterns across multiple files, making it useful for security researchers and bug bounty hunters. htrace.sh, on the other hand, provides in-depth analysis of HTTP transactions, including headers, SSL/TLS information, and performance metrics.
Use Cases
gf is ideal for:
- Quickly searching for potential security vulnerabilities in source code
- Identifying specific patterns in log files or data dumps
htrace.sh is better suited for:
- Detailed analysis of HTTP/HTTPS requests and responses
- Troubleshooting web server configurations and SSL/TLS issues
- Performance profiling of web applications
Both tools have their strengths, and the choice between them depends on the specific task at hand and the level of detail required in the analysis.
Fast and customizable vulnerability scanner based on simple YAML based DSL.
Pros of Nuclei
- More extensive vulnerability scanning capabilities with a large library of templates
- Supports multiple protocols (HTTP, DNS, TCP, etc.) for comprehensive testing
- Highly customizable and extensible through YAML-based templates
Cons of Nuclei
- Steeper learning curve due to its more complex template system
- May generate more false positives compared to htrace.sh's focused approach
- Requires more system resources for large-scale scans
Code Comparison
htrace.sh (Bash):
_init_cmd() {
local _FUNCTION_ID="_init_cmd"
local _STATE=0
commands=(\
basename dirname stat ps date grep egrep cut sed gawk \
tail pwd timeout)
# ...
}
Nuclei (Go):
func main() {
options := types.DefaultOptions()
if err := runner.ParseOptions(options); err != nil {
gologger.Fatal().Msgf("Could not parse options: %s\n", err)
}
// ...
}
Summary
While htrace.sh focuses on HTTP tracing and analysis, Nuclei offers a more comprehensive vulnerability scanning solution. htrace.sh is simpler to use and lighter on resources, while Nuclei provides greater flexibility and extensibility through its template system. The choice between the two depends on the specific security testing requirements and the user's level of expertise.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Description
htrace.sh
is a shell script for http/https troubleshooting and profiling. It's also a simple wrapper around several open source security tools.
For a more detailed understanding of htrace.sh
, its parameters, functions and how it all works, run htrace.sh --examples
or see the Wiki.
Preview
How To Use
To install htrace.sh
itself:
# Clone this repository
git clone https://github.com/trimstray/htrace.sh
# Go into directory
cd htrace.sh
# Install
sudo ./setup.sh install
# Install dependencies (Debian 8/9, Ubuntu 18.x and MacOS support)
# - recommend build docker image or install dependencies manually
# - before init please see what it does and which packages are available on your repository
sudo ./dependencies.sh
# Show examples
htrace.sh --examples
# Run the app
htrace.sh -u https://nmap.org -s -h
- symlink to
bin/htrace.sh
is placed in/usr/local/bin
- man page is placed in
/usr/local/man/man8
or build docker image:
# Clone this repository
git clone https://github.com/trimstray/htrace.sh
# Go into directory and build docker image
cd htrace.sh && build/build.sh
# Run the app
docker run --rm -it --name htrace.sh htrace.sh -u https://nmap.org -s -h
Parameters
Provides the following options:
htrace.sh v1.1.7
Usage:
htrace.sh <option|long-option> [value]
Examples:
htrace.sh -u https://example.com -s -h -b
htrace.sh -u https://example.com --all-scans
Options:
--help show this message
--version show script version
--examples show script examples
Standard:
-u|--url <value> set target url with http/https protocol
-s|--ssl show basic ssl server/connection parameters
-h|--headers show response headers
-b|--body show response body
-M|--req-method <value> set request method (default: GET)
-H|--req-header <value> set request header(s)
-p|--proxy <value> set proxy server (not for external tools)
-r|--resolve <value> resolve the host+port to this address
-i|--iface <value> set network interface (or address)
-a|--all-scans use all external security tools
Security tools:
--testssl test ssl protocols and ciphers (testssl.sh)
--observatory analyze website headers (mozilla observatory)
--ssllabs deep analysis of the ssl web server (ssllabs)
--mixed-content scan website for non-secure resources (mixed-content-scan)
--nse scan website and domain with nse library (nmap)
--waf detect and bypass web application firewalls (wafw00f)
--dns enumerate subdomains (subfinder) and perform zone transfer
--http2 test HTTP/2 (nghttp2)
Extended:
--ssl-bin <path> set path to the openssl bin
--ssl-debug debug ssl connection
--cache-bypass <value> try (proxy) cache bypass
--user-agent <value> set 'User-Agent' header
--referer <value> set 'Referer' header
--auth <value> set authentication method
--httpv <value> set http version
--tlsv <value> set tls version
--ciph <value> set of cryptographic algorithm
--max-redirects <num> set max redirects (default: 10)
--timeout <num> set max timeout (default: 15)
--hide-src-ip hide source ip from output
Contributing
See this.
Code Contributors
This project exists thanks to all the people who contribute.
License
GPLv3 : http://www.gnu.org/licenses/
Free software, Yeah!
Top Related Projects
A collection of custom security tools for quick needs.
Scripted Local Linux Enumeration & Privilege Escalation Checks
PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)
Fetch known URLs from AlienVault's Open Threat Exchange, the Wayback Machine, and Common Crawl.
A wrapper around grep, to help you grep for things
Fast and customizable vulnerability scanner based on simple YAML based DSL.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot