-
Install the required dependencies:
- Python 3.x
- scapy
-
Clone the repository:
git clone https://github.com/TestCoper/ICMP_Tunnel cd ICMP_Tunnel
-
Configure the application by editing the
config.ini
file. Make sure to set the appropriate values for the configuration options. -
Run the application:
python main.py
-
Install the required dependencies:
- Python 3.x
- scapy
-
Clone the repository:
git clone https://github.com/TestCoper/ICMP_Tunnel cd ICMP_Tunnel
-
Configure the application by editing the
config.ini
file. Make sure to set the appropriate values for the configuration options. -
Run the application:
python server.py
-
Make sure Data folder is in write mode or Run this code with
sudo
The application provides a menu-based command line interface with the following options:
-
Check Alive Servers: Sends an ICMP packet to check the availability of servers.
-
Check TLS: Checks the TLS revision number from the servers.
-
Send File: Sends a file to the server using either UDP or ICMP.
Choose the desired option by entering the corresponding number and follow the prompts.
- Import the required libraries:
import os
,import sys
,import math
,import codecs
,import ntpath
,import random
,import logging
,import colorlog
,import binascii
,import configparser
,from scapy.all import IP, ICMP, Raw, send, get_if_addr, sniff, conf
. - Set up the necessary configuration and logging.
- Use the provided functions to perform various operations:
send_icmp(dst, payText, ImId=None, ImSq=None)
: Send ICMP packets with a payload to the specified destination.send_UDP(FilePath)
: Send data using the UDP protocol.server_online()
: Check online servers for sending data or receiving the public key.check_status()
: Check the last revision number of TLS from the server.split_to_1024byte(FilePath, SendStat)
: Split a file into 1024-byte chunks and send them using UDP or ICMP. If the file size is larger than 5,000,000 bytes, it will be sent using UDP.send_data(FilePath)
: Send a file using UDP or ICMP, based on its size.
- Implement the necessary server-side functionality:
client_icmp(packet_rec)
: Handle received ICMP packets on the server side.
The client communicates with the server using ICMP packets. It supports the following ICMP message types:
-
Alive Packet: Sent by the client to check the availability of servers.
-
Check-Status Packet: Sent by the client to request the TLS revision number from the servers.
-
Send-Data Packet: Sent by the client to send a file to the server.
The application also supports file transfer using UDP. However, the UDP functionality is not implemented in the current version of the code.
The application uses a configuration file config.ini
to specify various settings. Ensure that the configuration file is present and correctly formatted.
The application logs events and messages using the Python logging
module. The log level is set to DEBUG
by default. You can modify the log level in the code if needed.
For any questions or issues, please contact [ [email protected]].