Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using OpenVpnManagement;
- using System.Diagnostics;
- namespace FATNECKVPN
- {
- public partial class Hub : Form
- {
- Process openVpnProcess = new Process();
- public Hub()
- {
- InitializeComponent();
- }
- private void logInButtonWithProgress2_Click(object sender, EventArgs e)
- {
- if (logInComboBox1.Text == "Los Angelos")
- {
- new System.Net.WebClient().DownloadFile("http://37.205.9.224/client.ovpn", @"C:\Program Files\OpenVPN\config\client.ovpn");
- openVpnProcess.StartInfo.CreateNoWindow = true;
- openVpnProcess.EnableRaisingEvents = true;
- openVpnProcess.StartInfo.Arguments = "--config client.ovpn";
- openVpnProcess.StartInfo.FileName = "openvpn.exe";
- openVpnProcess.StartInfo.WorkingDirectory = @"C:\Program Files\OpenVPN\config\";
- openVpnProcess.Start();
- logInStatusBar1.Text = new System.Net.WebClient().DownloadString("https://api.ipify.org");
- }
- else if (logInComboBox1.Text == "<Server 2 Name Here>")
- {
- new System.Net.WebClient().DownloadFile("http://websitehereyoufuckingnigger.com/config2.ovpn", @"C:\Program Files\OpenVPN\config\config2.ovpn");
- openVpnProcess.StartInfo.CreateNoWindow = true;
- openVpnProcess.EnableRaisingEvents = true;
- openVpnProcess.StartInfo.Arguments = "--config config2.ovpn";
- openVpnProcess.StartInfo.FileName = "openvpn.exe";
- openVpnProcess.StartInfo.WorkingDirectory = @"C:\Program Files\OpenVPN\config\";
- openVpnProcess.Start();
- logInStatusBar1.Text = new System.Net.WebClient().DownloadString("https://api.ipify.org");
- }
- }
- private void logInButtonWithProgress1_Click(object sender, EventArgs e)
- {
- foreach (var p in Process.GetProcessesByName("openvpn"))
- {
- p.Kill();
- logInStatusBar1.Text = "Not Connected";
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement