Advertisement
opexxx

fakedns-remnux.patch

Mar 10th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.66 KB | None | 0 0
  1. --- pyminifakeDNS.py    2013-11-16 09:33:03.450962039 +0100
  2. +++ fakedns 2013-11-16 09:39:19.754954549 +0100
  3. @@ -1,4 +1,7 @@
  4. +#!/usr/bin/python
  5. +
  6.  import socket
  7. +import sys
  8.  
  9.  class DNSQuery:
  10.    def __init__(self, data):
  11. @@ -27,6 +30,11 @@
  12.  
  13.  if __name__ == '__main__':
  14.    ip='192.168.1.1'
  15. +  try:
  16. +    ip=sys.argv[1]
  17. +  except:
  18. +    ip='192.168.1.1'
  19. +    print 'Using default IP address in responses. To over-write, use a command line option'
  20.    print 'pyminifakeDNS:: dom.query. 60 IN A %s' % ip
  21.    
  22.    udps = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  23. @@ -41,3 +49,4 @@
  24.    except KeyboardInterrupt:
  25.      print 'Finalizando'
  26.      udps.close()
  27. +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement