How to Add Proxies to Your ProxyChains Config File the Lazy Way ;) « Null Byte :: WonderHowTo

Hello fellow gray hat hackers, I wrote a program in python that helps me to fill up my proxychains.conf file, so I don't have to manually enter in the proxies. I figured I will give a little how-to of how I did it and maybe I could help some of you(hackers) out there to stay anonymous.What Is Proxychains?According tothis poston github;ProxyChains is a UNIX program, that hooks network-related libc functions in dynamically linked programs via a preloaded DLL and redirects the connections through SOCKS4a/5 or HTTP proxies.It is very useful if you want to combine two or more proxies to increase your level of anonymity.It can also be used with almost any application, to route all that application's traffic through the defined proxies in the configuration file.Unfortunately, I am not here to teach you how to set it up. You can click thislinkto know how to do that. It's really simple actually. So now the main part....Whole IdeaOkay, so basically, what we are going to do is:Open a webiste that provides free proxiesParse the contents of that website.Locate the proxies in the parsed contentAdd the proxy IPs and port numbers along with the protocol to our proxychains configuration file.Simple right....well let's get started..Step 1: Importing Modules and Setting the Options RightImage viatinypic.comWe are going to use the following modules:bs4(i.e. BeautifulSoup) - to parse the webpageurllib2 - to open the webpagebase64 - to decode the parsed IP addresses and port numbers(you will see why soon)os - to check for root permissionsys - to exit the programLine 5-7 - defining arrays to place our information in itLine 9-11- check if the program is running with root privileges so that we can edit the configuration file.Line 14-16 - check to make sure all arguments have been provided.Step 2: Opening the WebPage and Parsing Our DataImage viatinypic.comSo we just going to use http proxies, but you can feel free to modify the code for yourself.Anyway, our lucky proxy site winner ishttps://proxy-list.org/. We add a user-agent so we look legit, and not some proxy-stealing bot(they don't need to know that...lol). So well, we open our webpage and we use BeautifulSoup to parse the html, this way we can easily select which tags we want to be particular about, and get our proxies.Step 3: Getting Our Information and Filling Up the VariablesImage viatinypic.comOkay, so for this part, if you take a look at the html source code for proxy-list, you will see that, they put their proxies in a list form. So we can easily get that from our soup(the parsed data...lol).They also make it easy for us by adding an attribute so that we can easily get our proxies. Also, previously, the proxies used to be in plain text, but they recently began to encode them with base64, but that's not a problem for us, right?! That's what the base64 module is there for.So we decode the proxies and put them in a our list....and then we iterate through the whole list and separate the IPs from the port numbers so we can easily add it to our configuration file.Step 4: Finally, We Update Our Config FileImage viatinypic.comFinal Step, is just to open up our file and add the proxies to it.Noticed, I used 'a' as the mode to open the file so that, I don't overwrite what's already in it. And also, if you don't have root privileges you won't be able to write to the file(that's how mine was I don't know about you tho...)After that you just close the file, and you are done.ConclusionThank you guys for taking the time to read this. I hope you compeletely understand what's going on. If you don't just leave a comment below. And if you have any questions, I will try and answer them as soon as I can.EDIT:Hi guys, so I have made some improvements to the old program, so let's call this v2.0. I want to especially thankDefaltandJeremiah Paynefor pointing out the fact that, the proxies from the old one, weren't really helping in reducing anonymity. And of course, OTW'spostfor supplying better sources for the anonymity.Since I can't rewrite a whole how-to again, the concept is the same, so you can just check out the codehereon pastebin.God bless you.Wuzi out!!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:How to Evade Detection Using ProxychainsThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableHow To:Use Burp & FoxyProxy to Easily Switch Between Proxy SettingsHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Hide Your IP Address with a Proxy ServerHow To:BeEF - the Browser Exploitation Framework Project OVER WANHow To:Bypass School Internet Filters to Unblock WebsitesHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiNews:Top 25 Firefox TweaksHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateHow To:Bypass a Local Network Proxy for Free InternetHow To:Your Guide to Lazy Baking, Part 1: How to Make Mini-Pies in Muffin TinsAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeHow To:Use Tortunnel to Quickly Encrypt Internet Traffic