what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

tmap 0.1

tmap 0.1
Posted Mar 2, 2015
Authored by TheKingOf9x

tmap is a fast multi-threaded port scanner that tunnels through TOR.

tags | tool, scanner
systems | unix
SHA-256 | db20e08df203cb56e43fdac32a8d5e55b9a58acd729cf037136a8348620e6350

tmap 0.1

Change Mirror Download
# tmap 0.1
# Coded by TheKingOf9x <AT> yandex . com
# Fast multi-threaded port scanner which tunnels through TOR.
# Depends on the PySocks library: https://github.com/Anorov/PySocks
# And of course TOR: apt-get install tor
#
# Do not use hostnames, may leak DNS info. only use IP addresses.
#
# Not happy with the Privoxy + TOR (exit relay only) + nmap config. I made this.
#
# Usage:
# python tmap.py

import sys
import socks
import datetime
import threading
lock = threading.Semaphore(value = 1)

#Port of TOR server
TOR_PORT = 9050
#timeout. Experiment with this.
TIMEOUT = 20
#Port list to scan, ammend at will
ports = (21,22,23,80,443,1433,3306,8080)

def main():

if len(sys.argv) < 3:
print("\033[92m\n\t\t\ttmap 0.1\n\nFast multi-threaded port scanner which tunnels through TOR.\n\n\033[0m")
print("Single host scan:\npython " + sys.argv[0] + " -s 192.168.0.1\n")
print("/24 (Class C) range scan:\npython " + sys.argv[0] + " -r 192.168.0\n")
print("List scan:\npython " + sys.argv[0] + " -l IPlist.txt\n")
exit(0)

scan_type = sys.argv[1]
parameter = sys.argv[2]

filename = datetime.datetime.now().strftime("%H:%M_%d-%m-%y.tmap")
try:
log = open(filename, "a")
except:
pass

if scan_type == "-s":
host_scan(parameter, log)
elif scan_type == "-r":
range_scan(parameter, log)
elif scan_type == "-l":
list_scan(parameter, log)
else:
exit(1)

#main connect function
def connect(ip, port, log):
try:
s = socks.socksocket()
s.setproxy(socks.PROXY_TYPE_SOCKS5, 'localhost', TOR_PORT)
s.settimeout(TIMEOUT)
s.connect((ip, port))
output = ip + ":" + str(port)
lock.acquire() # Lock/unlock to clean up screen output.
print(output)

try:
log.write(output + "\n")
except:
pass

except:
pass

finally:
lock.release()

def host_scan(ip, log):
ip = ip.strip()
for port in ports:
try:
t = threading.Thread(target=connect, args=(ip, port, log))
t.start()
except:
pass

def range_scan(ip, log):
ip = ip.strip()
for i in range(1, 255):
ip_addr = ip + "." + str(i)
for port in ports:
try:
t = threading.Thread(target=connect, args=(ip_addr, port, log))
t.start()
except:
pass

def list_scan(parameter, log):
try:
f = open(parameter, 'r')
except:
print("Could not open file: " + parameter)
exit(1)

for ip in f:
ip = ip.strip()
for port in ports:
try:
t = threading.Thread(target=connect, args=(ip, port, log))
t.start()
except:
pass

if __name__ == '__main__':
main()
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close