Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   1486

null

by IAmBOBSTER - 08 May, 2020 - 02:50 AM
This post is by a banned member (IAmBOBSTER) - Unhide
This post is by a banned member (1145DC5A77ADD3FAD3CA) - Unhide
167
Posts
20
Threads
5 Years of service
#2
I code in Python mainly so don't quote me on this kek
If you are using CLI I would recommend reading your text file (proxies) from within the folder its in. Check here for help: 
https://stackoverflow.com/questions/7980456/reading-from-a-text-file-in-c-sharp
If your using a GUI interface then I recommend open dialog, check it out here: https://www.youtube.com/watch?v=_zjHbgGje0c
Now using proxies, you would want to use xNet or Leaf.xNet. You can install nuget packages or just import the requirement dll from either one of these github repos.
Leaf.xnet (Recommend!):

https://github.com/csharp-leaf/Leaf.xNet

X.net:
https://github.com/X-rus/xNet
To use the repos, just read the readme files and instructions :)
seized
This post is by a banned member (miloud1985) - Unhide
This post is by a banned member (JewOld) - Unhide
This post is by a banned member (TheDebianGuy) - Unhide
61
Posts
8
Threads
5 Years of service
#5
(This post was last modified: 20 May, 2020 - 01:38 PM by TheDebianGuy.)
This is code from my last c# project, it will scrape free proxies in txt file and set them using windows registry: EDIT: sorry, the code formatting here is broken
Code:
 
{ System.Net.WebClient wc = new System.Net.WebClient(); string url = "https://api.proxyscrape.com?request=getproxies&proxytype=http&timeout=5000&country=US"; WebRequest request = WebRequest.Create(url); WebResponse response = request.GetResponse(); Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); string responseFromServer = reader.ReadToEnd();   StreamWriter writer = new StreamWriter("proxy.txt", false); writer.Write(responseFromServer); writer.Close(); string MYPROXY = File.ReadLines("proxy.txt").First();   RegistryKey reg_key; reg_key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true); reg_key.SetValue("ProxyEnable", 1); reg_key.SetValue("ProxyServer", MYPROXY); listBox1.Items.Add(string.Format("{0} | {1}", time, "Proxy enabled")); }
Main website: https://thedebianguy.keybase.pub
[Image: ezgif.com-crop091ec57da105d927.gif]
Ehtical hacker and app developer...
   

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)