Advertisement
Guest User

dns client

a guest
Oct 24th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. GNU nano 3.2 dnsFinalclient.py
  2.  
  3. 1 from scapy.all import *
  4. 2 import random
  5. 3 import base64
  6. 4
  7. 5 num = 0
  8. 6 Ipers = IP(ttl = 255, src = "192.168.252.246", dst = "192.168.252.179")
  9. 7 Ports = UDP(sport = random.randint(6000,8999), dport = 53)
  10. 8 chunks = []
  11. 9 with open('text_to_dns.txt', "br") as f:
  12. 10 read_file = base64(f.read())
  13. 11 while len(read_file)>1600:
  14. 12 chunk_load = read_file[:1600]
  15. 13 chunks.append(chunk_load)
  16. 16 Dnser = DNS(rd = 1, qd = DNSQR(qname = "google.com", qtype = "A"),id = num)
  17. 17 chunk_load = Raw(load = chunk_load)
  18. 18 x = sr1(Ipers/Ports/Dnser/chunk_load)
  19. 19 num += 1
  20. 20 read_file = read_file[1600:]
  21. 21 if len(file_read)<1600:
  22. 22 chunk = file_read
  23. 23 Dnser = DNS(rd = 1, qd = DNSQR(qname = "google.com", qtype = "A"),id = num)
  24. 24 chunk_load = Raw(load = chunk_load)
  25. 25 x = sr1(Ipers/Ports/Dnser/chunk_load)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement