annyoung

[파밍 크롤러] pharming crawler 본문

프로그래밍

[파밍 크롤러] pharming crawler

nopsled 2015. 1. 28. 16:23



import sys, socket, urllib, re

#PharmingIp = 1958039481

userNum = 195804344

while True:

    data = urllib.urlopen('http://r.qzone.qq.com/cgi-bin/user/cgi_personal_card?uin=' + str(userNum)).read()

    ip = re.findall("nickname\":\"(.*?)\",", data)

    if len(ip) != 0:

        if ip[0].find('.') > 0:

            try:

                sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

                sock.connect((ip[0], 80))

                sock.send("GET %s HTTP/1.0\r\nHost: %s\r\n\r\n" % ('/', 'naver.com'))

                data = sock.recv(248)

            

                if data.find("NAVER") > 0:

                    print '[************************] ' + ip[0] + ':' + '80 [************************]'

                else:

                    print '[-] This server is not Pharming\t' + ip[0]

            except:

                print '[-] nickname/userNum : ' + ip[0] + '/' + str(userNum)

        else:

            pass

            #print '[-] not ip type.  uNum:' + str(userNum)

    else:

        pass

        #print '[-] data is not exist.  uNum:' + str(userNum)

    userNum+=1

 


comPharming.py




파밍 크롤러


닉네임 파싱해서 IP인 경우 파밍에 사용되는 서버인지 확인해주는 크롤러


얻어 걸리는건 정말 극소수... 없다고 보면 된다. (내가 왜 만들었지..)


20분 낭비..

Comments