Initial comnit
This commit is contained in:
parent
4ffdbf96c2
commit
1d2ff5999a
2 changed files with 50 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -158,3 +158,5 @@ cython_debug/
|
|||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
.idea/
|
||||
|
|
48
main.py
Normal file
48
main.py
Normal file
|
@ -0,0 +1,48 @@
|
|||
import sys
|
||||
import os
|
||||
import random
|
||||
import platform
|
||||
import argparse
|
||||
import threading
|
||||
import socket
|
||||
|
||||
R = '\033[31m'
|
||||
G = '\033[32m'
|
||||
C = '\033[36m'
|
||||
W = '\033[0m'
|
||||
|
||||
# v1: just create ddos script
|
||||
|
||||
# Instead of using SOCK_STREAM for TCP connections
|
||||
# using SOCK_DGRAM for UDP connections to keep packets small
|
||||
# If iterating on this, will use SOCK_STREAM to send bigger packets if I actually understand
|
||||
# what that means for the network being scanned
|
||||
|
||||
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
||||
|
||||
def ddos(target, port, ipaddress):
|
||||
try:
|
||||
while True:
|
||||
|
||||
|
||||
|
||||
for i in range(150):
|
||||
thread = threading.Thread(target=ddos)
|
||||
thread.start()
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="DDoS Proof of concept")
|
||||
parser.add_argument('-t', '--target', help="Attack target IP address")
|
||||
parser.add_argument('-p', '--port', help="Port to attack")
|
||||
parser.add_argument('-i', '--ipaddress', help="Fake ip address")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
ddos(args.target, args.port, args.ipaddress)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in a new issue