>>> pip install scapy
Create a basic packet with src and destination IP address, ttl(time to live), protocol to be used etc.
>>> x = IP(ttl=64)
>>> x.src = "192.36.151.40"
>>> x.dst = "183.81.159.136"
>>> x = x/TCP()/"Test-Packet Recieved"
>>> x
<IP frag=0 ttl=64 proto=tcp src=192.36.151.40 dst=183.81.159.136 |<TCP |<Raw load='Test-Packet Recieved'
Open wireshark and connect to the same network to which sender is connected to. Open the Network and apply the filter as follows:
ip.dst == 183.81.159.136
Press Start capturing button and then send the packets as below with count
set to how many packets to be sent:
>>> send(x, count=10)
The dataset DDoS SDN dataset is downloaded from kaggle.
The data is pre-processed and split into training (0.80) and testing (0.20) using pandas and sklearn library respectively.
pip install numpy pandas sklearn
The logisticRegression
class in sklearn.linear_model
is used to create an instance of the model. This model is trained with max_iters
(total no. of iterations to be run to train the model) is set to 10000.
Install the tensorflow library using below command
pip install tensorflow