Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- pyminifakeDNS.py 2013-11-16 09:33:03.450962039 +0100
- +++ fakedns 2013-11-16 09:39:19.754954549 +0100
- @@ -1,4 +1,7 @@
- +#!/usr/bin/python
- +
- import socket
- +import sys
- class DNSQuery:
- def __init__(self, data):
- @@ -27,6 +30,11 @@
- if __name__ == '__main__':
- ip='192.168.1.1'
- + try:
- + ip=sys.argv[1]
- + except:
- + ip='192.168.1.1'
- + print 'Using default IP address in responses. To over-write, use a command line option'
- print 'pyminifakeDNS:: dom.query. 60 IN A %s' % ip
- udps = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- @@ -41,3 +49,4 @@
- except KeyboardInterrupt:
- print 'Finalizando'
- udps.close()
- +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement