-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (24 loc) · 709 Bytes
/
main.py
File metadata and controls
28 lines (24 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import time
import os
import sys
import socket
import random
import string
try:
import requests
except ImportError:
os.system("pip install requests")
class DoS_example:
def __init__(self, ip:str=None, port:str=None, url:str=None, filesize:int=50) -> None:
self.ip = ip
self.port = port
self.url = url
self.sendranfile = random.sample(string.ascii_letters + string.digits, filesize)
print(self.sendranfile)
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
def socket_attrack(self):
port = 1
while True:
self.sock.connect(self.ip)
if __name__ == "__main__":
DoS_example()