File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -628,6 +628,9 @@ def cmdLineParser():
628628 parser .add_option ("--test-filter" , dest = "testFilter" ,
629629 help = SUPPRESS_HELP )
630630
631+ parser .add_option ("--dns-domain" , dest = "dnsDomain" ,
632+ help = SUPPRESS_HELP )
633+
631634 parser .add_option_group (target )
632635 parser .add_option_group (request )
633636 parser .add_option_group (optimization )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ """
4+ $Id$
5+
6+ Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
7+ See the file 'doc/COPYING' for copying permission
8+ """
9+
10+ class DNSQuery :
11+ """
12+ Used for making fake DNS resolution responses based on received
13+ raw request
14+
15+ Reference(s):
16+ http://code.activestate.com/recipes/491264-mini-fake-dns-server/
17+ https://code.google.com/p/marlon-tools/source/browse/tools/dnsproxy/dnsproxy.py
18+ """
19+
20+ def __init__ (self , raw ):
21+ self ._raw = raw
22+ self ._query = ""
23+
24+ type_ = (ord (raw [2 ]) >> 3 ) & 15 # Opcode bits
25+ if type_ == 0 : # Standard query
26+ i = 12
27+ j = ord (raw [i ])
28+ while j != 0 :
29+ self ._query += raw [i + 1 :i + j + 1 ] + '.'
30+ i = i + j + 1
31+ j = ord (raw [i ])
32+
33+ def response (self , resolution ):
34+ retval = ""
35+
36+ if self ._query :
37+ retval += self ._raw [:2 ] + "\x81 \x80 "
38+ retval += self ._raw [4 :6 ] + self ._raw [4 :6 ] + "\x00 \x00 \x00 \x00 " # Questions and Answers Counts
39+ retval += self ._raw [12 :] # Original Domain Name Question
40+ retval += "\xc0 \x0c " # Pointer to domain name
41+ retval += "\x00 \x01 \x00 \x01 \x00 \x00 \x00 \x3c \x00 \x04 " # Response type, ttl and resource data length -> 4 bytes
42+ retval += "" .join (chr (int (_ )) for _ in resolution .split ('.' )) # 4 bytes of IP
43+
44+ return retval
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ """
4+ $Id$
5+
6+ Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
7+ See the file 'doc/COPYING' for copying permission
8+ """
9+
10+ pass
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ """
4+ $Id$
5+
6+ Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
7+ See the file 'doc/COPYING' for copying permission
8+ """
9+
10+ def dnsUse (expression , expected = None , dump = False ):
11+ """
12+ Retrieve the output of a SQL query taking advantage of the DNS
13+ resolution mechanism by making request back to attacker's machine.
14+ """
15+
16+ raise NotImplementedError
Original file line number Diff line number Diff line change 1- Files in this folder represent SQL Procedural Language snippets used
1+ Files in this folder represent SQL ( Procedural Language) snippets used
22by sqlmap on the target system. They are licensed under the terms of
33the GNU Lesser General Public License.
You can’t perform that action at this time.
0 commit comments