Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ wheels/

# C# / .NET
bin/
!Python/modules/bin/
obj/
*.user
*.suo
Expand Down
32 changes: 32 additions & 0 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,38 @@ EyeWitness now uses **Python virtual environments** for all installations, provi

## Installation Methods

### 🐍 pipx Installation (All Platforms)

The quickest way to install EyeWitness — no cloning or setup scripts needed:

```bash
# Install pipx if you don't have it
apt install pipx

# Install EyeWitness from GitHub
pipx install git+https://github.com/RedSiege/EyeWitness.git

# Update your PATH environment variable then open a new terminal for the PATH change to take effect
pipx ensurepath
```

This creates an `eyewitness` command in an isolated environment. Usage:

```bash
eyewitness --single https://example.com
eyewitness -f urls.txt
eyewitness -x nmap_scan.xml
```

**Requirements:**
- Python 3.8+ with pip
- Chrome/Chromium browser (must be installed separately — pipx only handles Python dependencies)

**Uninstall:**
```bash
pipx uninstall eyewitness
```

### 🐧 Linux/macOS Installation

```bash
Expand Down
20 changes: 12 additions & 8 deletions Python/EyeWitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,11 @@ def exitsig(*args):
sort_data_and_write(cli_parsed, results)


if __name__ == "__main__":
def main():
cli_parsed = create_cli_parser()
start_time = time.time()
title_screen(cli_parsed)

if cli_parsed.resume:
print('[*] Loading Resume Data...')
temp = cli_parsed
Expand Down Expand Up @@ -529,36 +529,36 @@ def exitsig(*args):
print('[*] Running in URL validation mode only')
from modules.validation import validate_url_list
from modules.helpers import target_creator

url_list = target_creator(cli_parsed)
valid_urls, invalid_urls = validate_url_list(url_list, require_scheme=False)

print(f'\n[*] Validation Results:')
print(f' - Valid URLs: {len(valid_urls)}')
print(f' - Invalid URLs: {len(invalid_urls)}')

if invalid_urls:
print('\n[!] Invalid URLs found:')
for url, error in invalid_urls[:20]: # Show first 20
print(f' - {url}: {error}')
if len(invalid_urls) > 20:
print(f' ... and {len(invalid_urls) - 20} more')

# Write valid URLs to file
if valid_urls:
valid_file = os.path.join(cli_parsed.d, 'valid_urls.txt')
with open(valid_file, 'w') as f:
for url in valid_urls:
f.write(url + '\n')
print(f'\n[*] Valid URLs written to: {valid_file}')

if invalid_urls:
invalid_file = os.path.join(cli_parsed.d, 'invalid_urls.txt')
with open(invalid_file, 'w') as f:
for url, error in invalid_urls:
f.write(f'{url} # {error}\n')
print(f'[*] Invalid URLs written to: {invalid_file}')

print(f'\n[*] Validation completed in {time.time() - start_time:.2f} seconds')
sys.exit(0)

Expand Down Expand Up @@ -592,3 +592,7 @@ def exitsig(*args):
sys.exit()
class_info()
sys.exit()


if __name__ == "__main__":
main()
4 changes: 2 additions & 2 deletions Python/ValidateDefinitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ def find_definition_files():
base = Path.cwd()
candidates = {
"categories": [
base / "Python" / "modules" / "categories.txt",
base / "Python" / "categories.txt",
base / "categories.txt",
base / "categories.txt",
],
"signatures": [
base / "Python" / "modules" / "signatures.txt",
base / "Python" / "signatures.txt",
base / "signatures.txt",
base / "signatures.txt",
]
}
paths = {}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions Python/modules/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def create_folders_css(cli_parsed):

# Get paths using pathlib
local_path = Path(__file__).parent
bin_path = local_path.parent / 'bin'
bin_path = local_path / 'bin'

# Copy CSS and JS files using pathlib
shutil.copy2(bin_path / 'jquery-3.7.1.min.js', output_dir)
Expand All @@ -642,8 +642,8 @@ def default_creds_category(http_object):
try:
# Use pathlib for cross-platform path handling
module_dir = Path(__file__).parent
sigpath = module_dir.parent / 'signatures.txt'
catpath = module_dir.parent / 'categories.txt'
sigpath = module_dir / 'signatures.txt'
catpath = module_dir / 'categories.txt'
with open(sigpath) as sig_file:
signatures = sig_file.readlines()

Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@ EyeWitness/
>
> **Note**: Docker support is currently in development. Please use native installation options below for now.

### 🐍 pipx Installation (Quickest)
**Install directly from GitHub — no cloning, no setup scripts:**

```bash
pipx install git+https://github.com/RedSiege/EyeWitness.git
```

This creates an `eyewitness` command available system-wide in an isolated virtual environment. Then just run:

```bash
eyewitness --single https://example.com
eyewitness -f urls.txt
```

**Requirements:** Python 3.8+, [pipx](https://pipx.pypa.io/), and Chrome/Chromium browser installed on your system.

> **Note:** pipx handles Python dependencies automatically but does **not** install Chrome/Chromium. You must have a Chrome-based browser installed separately.

### 🪟 Windows Installation
**Automated setup with Python virtual environment:**

Expand Down Expand Up @@ -133,6 +151,14 @@ python Python/EyeWitness.py --single https://example.com
### 🚀 **How to Use EyeWitness**
After running the setup script, activate the virtual environment and run EyeWitness:

**🐍 pipx (no activation needed):**
```bash
eyewitness --single https://example.com
eyewitness -f urls.txt
eyewitness -x nmap_scan.xml
eyewitness -f urls.txt -d /path/to/output
```

**🐧 Linux/macOS:**
```bash
# 1. Activate the virtual environment
Expand Down
34 changes: 34 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "eyewitness"
version = "0.1.0"
description = "EyeWitness - screenshot websites and collect server header info"
readme = "README.md"
license = {text = "GPL-3.0"}
requires-python = ">=3.8"
dependencies = [
"netaddr>=0.10.0",
"psutil>=5.9.0",
"selenium>=4.29.0",
"rapidfuzz>=3.0.0",
"pyvirtualdisplay>=3.0; sys_platform != 'win32'",
"argcomplete>=2.0.0",
"requests>=2.28.0",
"urllib3>=1.26.0",
]

[project.scripts]
eyewitness = "EyeWitness:main"

[tool.setuptools]
package-dir = {"" = "Python"}
py-modules = ["EyeWitness"]

[tool.setuptools.packages.find]
where = ["Python"]

[tool.setuptools.package-data]
modules = ["bin/*", "categories.txt", "signatures.txt"]