Warned #1
(This post was last modified: 31 March, 2021 - 12:10 AM by Zovoz.)
 Hey there, I made a simple proxy checker in Python.
Save the proxies like that in the proxylist.txt:
Code:

Code:
[color=#2ecc71]IP:PORT[/color]

Spoiler: 
Code:

Code:
[color=#2ecc71]import socket
import os.path
class ProxyChecker():

    def __init__(self):
        print("Starting the checker...")


    def CheckProxy(self):
        try:
            with open('proxylist.txt', 'r+') as f:
                for line in f.readlines():
                    ipAddress = str.split(line, ':')[0]
                    port = str.split(line, ':')[1]
                    proxyIP = (ipAddress, int(port))
                    s = socket.socket(family=socket.AF_INET, type=socket.SOCK_STREAM)
                    s.settimeout(5)
                    print("[!] - Checking {} ...".format(proxyIP))
                    if s.connect_ex(proxyIP):
                        pass
                    else:
                        self.AddProxy(ipAddress + ":" + str(port))
        except IOError:
            print('proxylist.txt not found')



    def AddProxy(self, proxyAddress):
        with open('positive.txt', 'a') as f:
            #Duplicate Check:
            with open('positive.txt', 'r+') as r:
                if proxyAddress in r.readlines():
                    print("[!] - {} already added!".format(proxyAddress))
                else:
                    print("[+] - {} added!".format(proxyAddress))
                    f.write(proxyAddress)


if __name__ == "__main__":
    ProxyChecker().CheckProxy()[/color] [/hide]
 [align=center][color=#00ff00][/color][/align]
 
Leave a like!