CLI MITM-прокси, преобразующий SOCKS4/SOCKS5 в HTTP/HTTPS/HTTP2/HTTP3 с прозрачным перенаправлением TCP/UDP, спуфингом ARP/NDP/DNS, перехватом трафика и захватом пакетов. Чистый Go, без libpcap.
# GoHPTS — прозрачный прокси HTTP(S) и TCP/UDP к SOCKS4/SOCKS5 прокси (цепочке), написанный на Go
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://pkg.go.dev/github.com/shadowy-pycoder/go-http-proxy-to-socks)









## Содержание
- [Введение](#introduction)
- [Возможности](#features)
- [Установка](#installation)
- [Использование](#usage)
- [Настройка через флаги CLI](#configuration-via-cli-flags)
- [Настройка через YAML-файл](#configuration-via-yaml-file)
- [Прозрачный прокси](#transparent-proxy)
- [redirect (через NAT и SO_ORIGINAL_DST)](#redirect-via-nat-and-so_original_dst)
- [Автоматическая настройка для режима redirect](#auto-configuration-for-redirect-mode)
- [tproxy (через MANGLE и IP_TRANSPARENT)](#tproxy-via-mangle-and-ip_transparent)
- [Автоматическая настройка для режима tproxy](#auto-configuration-for-tproxy-mode)
- [Поддержка UDP](#udp-support)
- [Поддержка Android](#android-support)
- [Конфигурация YAML](#yaml-configuration)
- [Сниффинг трафика](#traffic-sniffing)
- [Формат JSON](#json-format)
- [Цветной формат](#colored-format)
- [Поддержка HTTP2 и HTTP3](#http2-and-http3-support)
- [Пример настройки с использованием самоподписанного сертификата](#example-setup-using-self-signed-certificate)
- [Проверка соединения](#test-connection)
- [Проверка соединения в браузере](#test-connection-in-a-browser)
- [Поддержка IPv4 и IPv6](#ipv4-and-ipv6-support)
- [ARP-спуфинг](#arp-spoofing)
- [NDP-спуфинг](#ndp-spoofing)
- [DNS-спуфинг](#dns-spoofing)
- [Захват пакетов](#packet-capture)
- [Сетевые пространства имён](#network-namespaces)
- [Настройка песочницы](#playground-setup)
- [Примеры использования](#usage-examples)
- [Смешанный сервер](#mixed-server)
- [Ссылки](#links)
- [Участие в разработке](#contributing)
- [Лицензия](#license)
## Введение
[[Назад]](#table-of-contents)
CLI-инструмент `GoHPTS` — это мост между HTTP-клиентами и SOCKS5-прокси-сервером или несколькими серверами (цепочкой). Он слушает локально как HTTP-прокси, принимает стандартные HTTP-
или HTTPS-запросы (через CONNECT) и перенаправляет соединение через SOCKS5-прокси. Вдохновлён [http-proxy-to-socks](https://github.com/oyyd/http-proxy-to-socks) и [Proxychains](https://github.com/rofl0r/proxychains-ng)
Возможный сценарий использования: вам нужно подключиться к внешнему API через Postman, но этот API доступен только с некоторого удалённого сервера.
Следующие команды помогут вам выполнить такую задачу:
Создайте SOCKS5-прокси-сервер через `ssh`:```shell
ssh <remote server> -D 1080 -Nf
```
Создайте HTTP-соединение с SOCKS5 с помощью `gohpts````shell
gohpts -s :1080 -l :8080
```
Укажите http-сервер в конфигурации прокси Postman
## Возможности
[[Назад]](#table-of-contents)
- **Функциональность цепочки прокси**\
Поддерживает цепочки `strict`, `dynamic`, `random`, `round_robin` из SOCKS4/SOCKS5 прокси
- **Прозрачный прокси**\
Поддерживает режимы `redirect` (SO_ORIGINAL_DST) и `tproxy` (IP_TRANSPARENT)
- **Поддержка IPv4 и IPv6**\
Работает в режимах `IPv4-only`, `IPv6-only` или `dual stack`
- **Прозрачный прокси TCP и UDP**\
`tproxy` и `tlocal` (IP_TRANSPARENT) обрабатывают трафик TCP и UDP
- **Сниффинг трафика**\
Прокси способен разбирать HTTP-заголовки, TLS-рукопожатие, DNS-сообщения и многое другое
- **ARP-спуфинг**\
Проксирование целых подсетей с помощью подхода ARP-спуфинга
- **NDP-спуфинг**\
Проксирование IPv6-соединений с использованием Router/Neighbor Advertisement и инъекций RDNSS.
- **DNS-спуфинг**\
Перенаправление клиентов на произвольные домены с помощью манипуляции DNS-записями
- **Захват пакетов**\
Захват трафика в файлы txt/pcap/pcapng и анализ с помощью Wireshark
- **Защита от утечек DNS**\
Разрешение DNS происходит на стороне сервера SOCKS5.
- **Поддержка метода CONNECT**\
Поддерживает туннелирование HTTP CONNECT, обеспечивая работу HTTPS и других протоколов на основе TCP.
- **Поддержка HTTP2/HTTP3**\
Поддерживает современный транспорт HTTP/2 и HTTP/3, обеспечивая эффективные мультиплексированные соединения поверх TLS 1.3
- **Поддержка сетевых пространств имён**\
Поддерживает пользовательские сетевые пространства имён Linux для слушающих сокетов и исходящих соединений
- **Поддержка Trailer-заголовков**\
Обрабатывает HTTP trailer-заголовки
- **Chunked Transfer Encoding**\
Обрабатывает chunked и потоковые ответы
- **Поддержка аутентификации SOCKS5**\
Поддерживает аутентификацию по имени пользователя/паролю для SOCKS5 прокси.
- **Поддержка аутентификации HTTP**\
Поддерживает аутентификацию по имени пользователя/паролю для HTTP прокси-сервера.
- **Лёгкий и быстрый**\
Разработан с минимальными накладными расходами и эффективной обработкой запросов.
- **Кроссплатформенность**\
Совместим со всеми основными операционными системами.
## Установка
[[Назад]](#table-of-contents)
- Arch Linux/CachyOS/EndeavourOS ```shell
yay -S gohpts
```
Или используя `paru`: ```shell
paru -S gohpts
```
- Скачайте бинарный файл для вашей платформы со страницы [Releases](https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases): ```shell
GOHPTS_RELEASE=v1.15.6; wget -v https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases/download/$GOHPTS_RELEASE/gohpts-$GOHPTS_RELEASE-linux-amd64.tar.gz -O gohpts && tar xvzf gohpts && mv -f gohpts-$GOHPTS_RELEASE-linux-amd64 gohpts && ./gohpts -h
```
- Установка с помощью команды `go install` (требуется Go [1.26](https://go.dev/doc/install) или новее): ```shell
CGO_ENABLED=0 go install -ldflags "-s -w" -trimpath github.com/shadowy-pycoder/go-http-proxy-to-socks/cmd/gohpts@latest
```
Это установит бинарный файл `gohpts` в ваш каталог `$GOPATH/bin`.
- Сборка из исходного кода: ```shell
git clone https://github.com/shadowy-pycoder/go-http-proxy-to-socks.git
cd go-http-proxy-to-socks
make build
./bin/gohpts
```
- Запуск в docker: ```shell
docker run -it --privileged --network host -v "$PWD/gohpts.yaml:/config.yaml" shadowypycoder/gohpts:latest -f config.yaml
```
## Использование
[[Назад]](#table-of-contents)```shell
gohpts -h
_____ _ _ _____ _______ _____
/ ____| | | | | __ \__ __/ ____|
| | __ ___ | |__| | |__) | | | | (___
| | |_ |/ _ \| __ | ___/ | | \___ \
| |__| | (_) | | | | | | | ____) |
\_____|\___/|_| |_|_| |_| |_____/
GoHPTS: HTTP(S) Proxy to SOCKS4/SOCKS5 proxy by shadowy-pycoder
GitHub: https://github.com/shadowy-pycoder/go-http-proxy-to-socks
Codeberg: https://codeberg.org/shadowy-pycoder/go-http-proxy-to-socks
Usage: gohpts [OPTIONS]
OPTIONS:
General:
-h Show this help message and exit
-v Show version and build information
-D Run as a daemon (provide -logfile to see logs)
-I Display list of network interfaces and exit
-f Path to proxy configuration file in YAML format
Proxy:
-l Address of HTTP proxy server (Default: "127.0.0.1:8080" for IPv4, "[::1]:8080" for IPv6)
-s Address of SOCKS proxy server (Default: "127.0.0.1:1080" for IPv4 "[::1]:1080" for IPv6)
-c Path to certificate PEM encoded file
-k Path to private key PEM encoded file
-U User for HTTP proxy (basic auth). This flag invokes prompt for password (not echoed to terminal)
-u User for SOCKS proxy authentication. This flag invokes prompt for password (not echoed to terminal)
-i Bind proxy to specific network interface (either by interface name or index)
-4 Force IPv4 stack for TCP and UDP (Default: dual stack)
-6 Force IPv6 stack for TCP and UDP (Default: dual stack)
-socks4 Use SOCKS4/SOCKS4a protocol for upstream proxy and mixed server (default: SOCKS5/SOCKS5h)
-nohttp Disable HTTP proxy server
-nosocks Disable SOCKS upstream proxy
-dns Use custom DNS server (Example: "8.8.8.8" or "2001:4860:4860::8888")
-mixed Accept SOCKS connections on HTTP proxy server address
Logs:
-d Show logs in DEBUG mode
-j Show logs in JSON format
-logfile Log file path (Default: stdout)
-nocolor Disable colored output for logs (no effect if -j flag specified)
-pprof Address of pprof server with profiling data
Sniffing:
-sniff Enable traffic sniffing for HTTP and TLS
-snifflog Sniffed traffic log file path (Default: the same as -logfile)
-body Collect request and response body for HTTP traffic (credentials, tokens, etc)
TProxy:
-T Address of transparent proxy server
-Tu Address of transparent UDP proxy server
-M Transparent proxy mode: (redirect, tproxy, tlocal)
-w Number of instances of transparent proxy server (Default: number of CPU cores)
-wu Number of instances of transparent UDP proxy server (Default: number of CPU cores)
-auto Automatically setup iptables and kernel parameters for transparent proxy (requires elevated privileges)
-mark Set mark for each packet sent through transparent proxy (Default: redirect 0, tproxy 100, tlocal 100)
-A Comma separated list of allowed ip addresses for proxying (Example: "8.8.8.8,2001:4860:4860::8888,192.168.1.0/24")
-P Comma separated list of ports to ignore when proxying traffic (Example: "22,80,443,9092")
-dump Dump iptables rules and other system settings generated by -auto flag
Spoofing:
-arpspoof Enable ARP spoof proxy for selected targets (Example: "targets 10.0.0.1,10.0.0.5-10,192.168.1.*,192.168.10.0/24;fullduplex false;debug true;interval 10s")
-ndpspoof Enable NDP spoof proxy for selected targets (Example: "ra true;na true;targets fe80::3a1c:7bff:fe22:91a4;fullduplex false;debug true;interval 10s")
Packet Capture:
-pcap Enable packet capture (Example: "promisc true;expr ip proto tcp;snaplen 65535;timeout 10s;packet_count 100;packet_buffer 8192;exts txt,pcap,pcapng")
Namespaces:
-in-netns Name or path of network namespace for inbound listeners (Default: default namespace)
-out-netns Name or path of network namespace for outbound connections (Default: default namespace)
```
### Настройка через флаги CLI
[[Назад]](#table-of-contents)```shell
gohpts -s 1080 -l 8080 -d -j
```
I don't see any content to translate in your message. The "INPUT:" section is empty — no Markdown text was included after it.
Please send the actual chunk 21 content (the Markdown text you want translated from English to Russian), and I'll return only the translated Markdown, preserving all structure, code, paths, URLs, and identifiers exactly as required.```shell
{"level":"info","time":"2025-05-28T06:15:18+00:00","message":"SOCKS5 Proxy: :1080"}
{"level":"info","time":"2025-05-28T06:15:18+00:00","message":"HTTP Proxy: :8080"}
{"level":"debug","time":"2025-05-28T06:15:22+00:00","message":"HTTP/1.1 - CONNECT - www.google.com:443"}
```
Укажите имя пользователя и пароль для SOCKS5-прокси-сервера:```shell
gohpts -s 1080 -l 8080 -d -j -u user
SOCKS5 Password: #you will be prompted for password input here
```
Укажите имя пользователя и пароль для HTTP-прокси-сервера:```shell
gohpts -s 1080 -l 8080 -d -j -U user
HTTP Password: #you will be prompted for password input here
```
Если присутствуют и `-u`, и `-U`, вам будет предложено ввести данные дважды
Запуск HTTP-прокси через TLS-соединение```shell
gohpts -s 1080 -l 8080 -c "path/to/certificate" -k "path/to/private/key"
```
Запустите прокси как демон (для вывода логов нужен logfile, иначе вы ничего не увидите)```shell
gohpts -D -logfile /tmp/gohpts.log
```
| `--no-color` | Отключить цветной вывод |
| `--debug` | Включить отладочный вывод |
| `--verbose` | Включить подробный вывод |
| `--silent` | Подавить весь вывод |
| `--version` | Показать версию и выйти |
| `--help` | Показать справку и выйти |```shell
# output
gohpts pid: <pid>
```
| `--no-color` | Отключить цветной вывод |
| `--debug` | Включить отладочный вывод |
| `--verbose` | Включить подробный вывод |
| `--silent` | Отключить весь вывод, кроме ошибок |
| `--version` | Показать версию и выйти |
| `--help` | Показать справку и выйти |```shell
# kill the process
kill <pid>
#or
kill $(pidof gohpts)
```
Флаги `-u` и `-U` не работают в режиме демона (и, следовательно, при аутентификации), но вы можете указать файл конфигурации (см. ниже)
### Конфигурация через YAML-файл
[[Назад]](#table-of-contents)
Файлы конфигурации полезны, когда вы хотите предварительно настроить прокси, не слишком заморачиваясь с CLI, или просто хотите иметь несколько профилей для разных нужд.
Запуск HTTP-прокси в режиме цепочки SOCKS5-прокси (укажите настройки сервера через YAML-файл конфигурации)```shell
gohpts -f "~/gohtps.yaml" -d -j
```
Пример конфигурации:```yaml
# bind proxy to specific network interface (either by interface name or index)
interface: "eth0" # if specified, overrides http server IP address
disable_http: false # disable http proxy (default: false)
disable_socks: false # disable upstream socks proxy (default: false)
# if ipv4 and ipv6 are both false or both true, dual stack is assumed
ipv4: false # this must be enabled for arpspoof (default: false)
ipv6: false # this must be enabled for ndpspoof (default: false)
socks4: false # use SOCKS4/SOCKS4a protocol (tcp only protocol, no udp tproxy or http3 possible) (default: false)
dns: 8.8.8.8 # custom DNS server (used in direct dialer, namespaces, spoofing)
http_server:
address: 127.0.0.1:8080
# username and password for adding basic authentication (comment out to disable auth)
username: username
password: password
# list of socks5 proxy
# if proxy_chain is disabled, uses first server in a list as upstream
proxy_list:
- address: 127.0.0.1:1080
- address: 127.0.0.1:1081
- address: :1082 # empty host means localhost
proxy_chain:
enabled: false
# Explanations for chains taken from /etc/proxychains4.conf
# strict - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# all proxies must be online to play in chain
# dynamic - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped)
# random - Each connection will be done via random proxy
# (or proxy chain, see chain_len) from the list.
# this option is good to test your IDS :)
# round_robin - Each connection will be done via chained proxies
# of chain_len length
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped).
# the start of the current proxy chain is the proxy after the last
# proxy in the previously invoked proxy chain.
# if the end of the proxy chain is reached while looking for proxies
# start at the beginning again.
# These semantics are not guaranteed in a multithreaded environment.
type: strict # dynamic, strict, random, round_robin
length: 2 # maximum number of proxy in a chain (works only for random chain and round_robin chain)
logging:
debug: true
json: false
# defaults to standard output
#logfile: /tmp/gohpts.log
# use colored output in logs (no effect if json enabled)
nocolor: false
# profiling data
pprof: 127.0.0.1:8081
```
Вы можете переопределить практически любые настройки, указанные в файле конфигурации, указав соответствующие флаги CLI:```shell
gohpts -l :6969 -f "~/gohtps.yaml" -nocolor
```
Proxy принимает все настройки, указанные в `~/gohpts.yaml`, но запускает http-сервер на `127.0.0.1:6969` вместо `127.0.0.1:8080`, а также отключает цветной вывод в логах.
Некоторые настройки (например, proxy_chain и dns-фильтры) можно задать только через файл.
Полная версия конфигурации доступна здесь: [example_gohpts.yaml](https://github.com/shadowy-pycoder/go-http-proxy-to-socks/blob/main/resources/example_gohpts.yaml)
Чтобы узнать больше о цепочках прокси, посетите [Proxychains Github](https://github.com/rofl0r/proxychains-ng)
## Прозрачный прокси
[[Назад]](#table-of-contents)
> Также известный как `перехватывающий прокси`, `встроенный прокси` или `принудительный прокси`, прозрачный прокси перехватывает обычную коммуникацию на уровне приложений, не требуя какой-либо специальной конфигурации клиента. Клиентам не нужно знать о существовании прокси. Прозрачный прокси обычно располагается между клиентом и Интернетом, выполняя часть функций шлюза или маршрутизатора
>
> -- _Из [Wiki](https://en.wikipedia.org/wiki/Proxy_server)_
Эта функциональность доступна только в системах Linux и Android (arm64) и требует дополнительной настройки (`iptables`, ip route и т. д.)
Флаг `-T address` задаёт адрес сервера прозрачного прокси
Существует три режима: `redirect`, `tproxy` и `tlocal` (то же, что `tproxy`, но также перехватывает локальный трафик), которые можно указать с помощью флага `-M`
### `redirect` (через _NAT_ и _SO_ORIGINAL_DST_)
[[Назад]](#table-of-contents)
В этом режиме проксирование происходит с помощью таблицы `nat` в `iptables` и цели `REDIRECT`. Адрес входящего пакета меняется на адрес запущенного прозрачного прокси `redirect`, но он также содержит исходный пункт назначения, который можно получить с помощью `getsockopt(SO_ORIGINAL_DST)`
Чтобы запустить `GoHPTS` в этом режиме, используйте флаг `-T` с `-M redirect`
### Пример
[[Назад]](#table-of-contents)```shell
# run the proxy
gohpts -s 1080 -T 1090 -M redirect -d
```
## Установка
### Требования
- Python 3.8+
- pip (менеджер пакетов Python)
### Шаги
1. **Клонируйте репозиторий:**
```bash
git clone https://github.com/yourusername/kitploit-tool.git
cd kitploit-tool
```
2. **Создайте виртуальное окружение (рекомендуется):**
```bash
python3 -m venv venv
source venv/bin/activate # В Windows: venv\Scripts\activate
```
3. **Установите зависимости:**
```bash
pip install -r requirements.txt
```
4. **Настройте параметры:**
```bash
cp config.example.yaml config.yaml
# Отредактируйте config.yaml под свои нужды
```
5. **Запустите инструмент:**
```bash
python kitploit.py --help
```
## Использование
### Базовое использование
```bash
python kitploit.py -t example.com
```
### Расширенные параметры
```bash
python kitploit.py -t example.com -o json -v --threads 10
```
### Параметры командной строки
| Параметр | Описание | По умолчанию |
|----------|-------------|---------|
| `-t, --target` | Целевой домен или IP-адрес | Обязательный |
| `-o, --output` | Формат вывода (text, json, csv) | text |
| `-v, --verbose` | Включить подробный вывод | False |
| `--threads` | Количество потоков | 5 |
| `--timeout` | Тайм-аут в секундах | 30 |
| `-h, --help` | Показать справку | |
## Примеры
### Пример 1: Базовое сканирование
```bash
python kitploit.py -t example.com
```
Вывод:
```
[*] Начало сканирования example.com
[+] Обнаружен открытый порт: 80
[+] Обнаружен открытый порт: 443
[*] Сканирование завершено
```
### Пример 2: Вывод в формате JSON
```bash
python kitploit.py -t example.com -o json
```
### Пример 3: Расширенное сканирование с несколькими потоками
```bash
python kitploit.py -t example.com --threads 20 -v
```
## Конфигурация
Инструмент использует файл `config.yaml` для настройки. Пример конфигурации:
```yaml
target:
timeout: 30
threads: 5
output:
format: text
verbose: false
scan:
ports: [21, 22, 80, 443, 8080]
services: true
```
## Участие в разработке
Мы приветствуем вклад в развитие проекта! Пожалуйста, следуйте этим шагам:
1. Форкните репозиторий
2. Создайте ветку для новой функции (`git checkout -b feature/amazing-feature`)
3. Зафиксируйте изменения (`git commit -m 'Add amazing feature'`)
4. Отправьте изменения в ветку (`git push origin feature/amazing-feature`)
5. Откройте Pull Request
## Лицензия
Этот проект распространяется под лицензией MIT — подробности см. в файле [LICENSE](https://github.com/shadowy-pycoder/go-http-proxy-to-socks/blob/main/LICENSE).
## Отказ от ответственности
Этот инструмент предназначен только для образовательных целей и тестирования на проникновение с разрешения. Используйте его ответственно и только в законных целях. Авторы не несут ответственности за любое неправомерное использование или ущерб, причинённый этим программным обеспечением.
## Контакты
- Автор: Your Name
- GitHub: [@yourusername](https://github.com/yourusername)
- Email: [email protected]
## Благодарности
- Особая благодарность всем участникам проекта
- Вдохновлено различными инструментами безопасности с открытым исходным кодом
- Спасибо сообществу за постоянную поддержку```shell
# run socks5 server on 127.0.0.1:1080
ssh remote -D 1080 -Nf
```
Настройте вашу операционную систему:```shell
# commands below require elevated privileges (you can run it with `sudo -i`)
#enable ip forwarding
sysctl -w net.ipv4.ip_forward=1
# create `GOHPTS` nat chain
iptables -t nat -N GOHPTS
# set no redirection rules for local, http proxy, ssh and redirect proxy itself
iptables -t nat -A GOHPTS -d 127.0.0.0/8 -j RETURN
iptables -t nat -A GOHPTS -p tcp --dport 8080 -j RETURN
iptables -t nat -A GOHPTS -p tcp --dport 1090 -j RETURN
iptables -t nat -A GOHPTS -p tcp --dport 22 -j RETURN
# redirect traffic to transparent proxy
iptables -t nat -A GOHPTS -p tcp -j REDIRECT --to-ports 1090
# setup prerouting by adding our proxy
iptables -t nat -A PREROUTING -p tcp -j GOHPTS
# intercept local traffic for testing
iptables -t nat -A OUTPUT -p tcp -j GOHPTS
```
Проверка соединения:```shell
#traffic should be redirected via 127.0.0.1:1090
curl http://example.com
```
| `--list` | List all available modules |
| `--module <name>` | Run a specific module |
| `--output <file>` | Save results to a file |
| `--verbose` | Enable verbose output |
| `--threads <n>` | Number of concurrent threads |
| `--timeout <sec>` | Request timeout in seconds |
| `--proxy <url>` | Use a proxy for requests |
| `--user-agent <string>` | Set a custom User-Agent |
| `--no-color` | Disable colored output |
| `--config <file>` | Load configuration from file |
| `--version` | Show version information |
| `--help` | Show help message |
### Examples
```bash
# List all modules
python3 tool.py --list
# Run a specific module
python3 tool.py --module scan --target example.com
# Save output to file
python3 tool.py --module scan --target example.com --output results.txt
# Use a proxy
python3 tool.py --module scan --target example.com --proxy http://127.0.0.1:8080
```
## Configuration
The tool can be configured using a configuration file. By default, it looks for `config.yaml` in the current directory.
```yaml
# config.yaml
timeout: 30
threads: 10
user_agent: "Mozilla/5.0"
proxy: null
verbose: false
```
## Modules
### scan
The `scan` module performs a basic scan of the target.
**Options:**
- `--target` - Target URL or IP address (required)
- `--ports` - Ports to scan (default: common ports)
- `--full` - Perform a full scan
### enum
The `enum` module enumerates information about the target.
**Options:**
- `--target` - Target URL or IP address (required)
- `--subdomains` - Enumerate subdomains
- `--dns` - Enumerate DNS records
### exploit
The `exploit` module attempts to exploit known vulnerabilities.
**Options:**
- `--target` - Target URL or IP address (required)
- `--cve` - CVE ID to exploit
- `--payload` - Custom payload to use
## Output
The tool outputs results in a structured format. By default, results are printed to the console. Use the `--output` flag to save results to a file.
Example output:
```
[+] Target: example.com
[+] IP: 93.184.216.34
[+] Open ports: 80, 443
[+] Vulnerabilities found: 2
- CVE-2021-1234
- CVE-2021-5678
```
## Troubleshooting
### Common Issues
**Module not found**
Make sure the module name is correct. Use `--list` to see all available modules.
**Connection timeout**
Increase the timeout value using the `--timeout` flag.
**Permission denied**
Run the tool with appropriate permissions or use `sudo`.
## Contributing
Contributions are welcome! Please follow these guidelines:
1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Open a Pull Request
## License
This project is licensed under the MIT License. See the `LICENSE` file for details.
## Disclaimer
This tool is intended for educational and authorized testing purposes only. The authors are not responsible for any misuse or damage caused by this tool.```shell
#traffic should be redirected via 127.0.0.1:8080
curl --proxy http://127.0.0.1:8080 http://example.com
```
Отменить всё:```shell
sysctl -w net.ipv4.ip_forward=0
iptables -t nat -D PREROUTING -p tcp -j GOHPTS
iptables -t nat -D OUTPUT -p tcp -j GOHPTS
iptables -t nat -F GOHPTS
iptables -t nat -X GOHPTS
```
### Автоматическая настройка для режима `redirect`
[[Назад]](#table-of-contents)
Чтобы настроить систему автоматически, выполните следующую команду:```shell
sudo env PATH=$PATH gohpts -d -T 8888 -M redirect -auto
```
Обратите внимание: автоматическая настройка требует `sudo` и является очень общей, что может не подойти для ваших нужд.
При необходимости можно указать `-mark <value>`, чтобы предотвратить возможные циклы прокси.```shell
sudo env PATH=$PATH gohpts -d -T 8888 -M redirect -auto -mark 100
```
### `tproxy` (через _MANGLE_ и _IP_TRANSPARENT_)
[[Назад]](#table-of-contents)
---
[Read more](https://github.com/shadowy-pycoder/go-http-proxy-to-socks)