Marspedia:BWABOM LMEES
NOTES:
- Copy source code from between the <PRE> tags in this page's source markup as PRE isn't perfect about passing on text unmodified.
- List of targeted accounts and IPs must be formatted as a python list -- although there is commented code for pasting a column of names and IPs that may be fixable -- The author of this crude utility hasn't managed to look at it. Look for "##### paste in list of bulk usernames to block * * * HERE * * *" below.
- The location on your machine to put the generated html file needs to be changed -- this was made noninteractive to speed up usage. Look for "##### PASTE OUTPUT HTML FILE NAME * * * HERE * * *" below.
#!/usr/bin/python #%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%# # # # Bulk-Wiki-Attacker-Block-O-Mat # # # # version 0.1 # # # # Developed for LPedia.org # # by James Gholston, 2007 # # # # Version for annoying pure # # vandal using anonymous botnet # # attacking five space wikis # # Public Domain # # # #%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%# # This is completely non-interactive, unlike the proper version of BWABOM -- a result # of the urgency of the situation that caused its creation # Q: Will I ever get around to re-adding the functionality? # torque -- how much to squeeze (rule of thumb: # single attack is 3 years, multiple per name is 5 -- # this helps to identify attack severity when looking at # the logfile) # roster -- list of offending accounts entered # reason -- hardwired as "SPAM" # blockheads -- holding list while assembling roster # whack_a_pest -- iteration through roster # venue -- location of output html file with links # implement -- output html # range -- is the output successfully saved to the firing range? # gallery -- file object reason="zombie botnet node making unuseful posts" ##"SPAM" changed for more generic use # Select duration torque = "1 month" ##### ##### ##### paste in list of bulk usernames to block * * * HERE * * * ##### ##### roster = ["64.68.119.151", "80.156.84.40", "201.209.198.36", "218.61.16.8", "207.234.145.43", "218.22.128.243", "85.255.120.181", "80.156.84.39", "203.124.131.68", "217.172.56.174"] ##### ##### blockheads = "1" ##print "Paste and/or type in list of destructive accounts; press return more than once if necessary." ### if line != "" keep going ##while(blockheads): ## blockheads = raw_input(">>>>") ## if(blockheads): roster += [blockheads] # Output html page with list of links to open to block them implement = "<HTML><HEAD><TITLE>Bulk-Wiki-Attacker-Block-O-Mat shooting gallery</TITLE></HEAD><BODY>\n" #http://www.exoplatz.org/index.php?title=Special:Blockip&wpBlockAddress=216.73.53.2&wpBlockOther=1%20week&wpBlockReason=zombie%20node%20of%20extra-annoying%20botnet&wpBlock= for whack_a_pest in roster: implement += "<A href=\"http://www.exoplatz.org/index.php?title=Special:Blockip&wpBlockAddress=" + whack_a_pest + "&wpBlockOther=" + torque + "&wpBlockReason=" + reason + "&wpBlock=\"Block this user\"\">Open in new tab to ban " + whack_a_pest + " for " + torque + " from Exoplatz</A><BR/>\n" implement += "<A href=\"http://www.exodictionary.org/index.php?title=Special:Blockip&wpBlockAddress=" + whack_a_pest + "&wpBlockOther=" + torque + "&wpBlockReason=" + reason + "&wpBlock=\"Block this user\"\">Open in new tab to ban " + whack_a_pest + " for " + torque + " from ExoDictionary</A><BR/>\n" implement += "<A href=\"http://www.scientifiction.org/index.php?title=Special:Blockip&wpBlockAddress=" + whack_a_pest + "&wpBlockOther=" + torque + "&wpBlockReason=" + reason + "&wpBlock=\"Block this user\"\">Open in new tab to ban " + whack_a_pest + " for " + torque + " from Scientifiction.org</A><BR/>\n" implement += "<A href=\"http://www.marspedia.org/index.php?title=Special:Blockip&wpBlockAddress=" + whack_a_pest + "&wpBlockOther=" + torque + "&wpBlockReason=" + reason + "&wpBlock=\"Block this user\"\">Open in new tab to ban " + whack_a_pest + " for " + torque + " from Marspedia.org</A><BR/>\n" implement += "<A href=\"http://www.lunarpedia.org/index.php?title=Special:Blockip&wpBlockAddress=" + whack_a_pest + "&wpBlockOther=" + torque + "&wpBlockReason=" + reason + "&wpBlock=\"Block this user\"\">Open in new tab to ban " + whack_a_pest + " for " + torque + " from Lunarpedia.org</A><BR/>\n" implement += "</BODY></HTML>\n" # print implement # save file to disk (or possibly disc, although *I* can't save # a file directly to disc right now) # commented out fault tolerance code not tested yet range = 0 ##print "save html file as (path and filename) -- .html extension suggested" while not range: ##### ##### ##### PASTE OUTPUT HTML FILE NAME * * * HERE * * * ##### ##### venue = "/home/strangelv/bbeesm02.net.html" ##### ##### ##raw_input("file and path to save:") #try: gallery=open(venue, "w") gallery.write(implement) gallery.close() range=1 #except: #if gallery: gallery.close() #print "Something went wrong. Let's try that again." # Enjoy! print "open "+venue+" in your preferred tab-capable web browser and have a blast!"