Advertisement
njunwa1

failedcode

Dec 25th, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.75 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using System.IO;
  11. using System.Diagnostics;
  12.  
  13.  
  14. namespace Multi_SSH
  15. {
  16.     public partial class Form1 : Form
  17.     {
  18.         public Form1()
  19.         {
  20.             InitializeComponent();
  21.         }
  22.  
  23.         private void button1_Click(object sender, EventArgs e)
  24.         {
  25.             string server = textBox1.Text;
  26.             string serverPort = textBox2.Text;
  27.             string user = textBox3.Text;
  28.             string pass = textBox4.Text;
  29.             string proxy = textBox5.Text;
  30.             string proxyPort = textBox6.Text;
  31.             string ssh1;
  32.             string ssh5;
  33.             string pfp5;
  34.             string selectedssh="";
  35.             string selectedpf="";
  36.  
  37.             if (radioButton1.Checked == true)
  38.                 selectedssh = "-profile=Bitvise\\PremiumSSH1.bscp -host=" + server + " -Port=" + serverPort + " -username=" + user + " -password=" + pass + " -loginOnStartup -hide=hostkey -hide=trayWRC -hide=traySFTP -hide=trayRDP -hide=trayPopups -hide=trayLog -disableSftplocation -Title=EsTeLeR -proxy=y -proxyType=HTTP -proxyServer=" + proxy + " -proxyPort=" + proxyPort + "\"";
  39.             else if (radioButton2.Checked == true)
  40.                 MessageBox.Show("hellow2");
  41.             else if (radioButton3.Checked == true)
  42.                 MessageBox.Show("hellow3");
  43.             else if (radioButton4.Checked == true)
  44.                 MessageBox.Show("hellow4");
  45.             else
  46.                 selectedssh = "-profile=Bitvise\\PremiumSSH5.bscp -host=" + server + " -Port=" + serverPort + " -username=" + user + " -password=" + pass + " -loginOnStartup -hide=hostkey -hide=trayWRC -hide=traySFTP -hide=trayRDP -hide=trayPopups -hide=trayLog -disableSftplocation -Title=EsTeLeR -proxy=y -proxyType=HTTP -proxyServer=" + proxy + " -proxyPort=" + proxyPort + "\"";
  47.                 selectedpf = "Proxifier\\Profiles\\PremiumSSH5.ppx silent-load";
  48.  
  49.             //ssh1 = Application.StartupPath +"\\Bitvise\\Tunnel.exe -profile=Bitvise\\PremiumSSH1.bscp -host=" + server + " -Port=" + serverPort + " -username=" + user + " -password=" + pass + " -loginOnStartup -hide=hostkey -hide=trayWRC -hide=traySFTP -hide=trayRDP -hide=trayPopups -hide=trayLog -disableSftplocation -Title=EsTeLeR -proxy=y -proxyType=HTTP -proxyServer=" + proxy + " -proxyPort=" + proxyPort + " \"";
  50.             //ssh5 = Application.StartupPath + "\\Bitvise\\Tunnel.exe -profile=Bitvise\\PremiumSSH5.bscp -host=" + server + " -Port=" + serverPort + " -username=" + user + " -password=" + pass + " -loginOnStartup -hide=traySFTP -hide=trayRDP -hide=trayPopups -Title=EsTeLeR -proxy=y -proxyType=HTTP -proxyServer=" + proxy + " -proxyPort=" + proxyPort +"\"";
  51.  
  52.             //pfp5 = Application.StartupPath + "\\Proxifier\\Proxifier.exe Proxifier\\Profiles\\PremiumSSH5.ppx silent-load";
  53.  
  54.             Process shell = new Process();
  55.             ProcessStartInfo shellinfo = new ProcessStartInfo();
  56.             shellinfo.WindowStyle = ProcessWindowStyle.Hidden;
  57.             shellinfo.FileName = "\\Bitvise\\Tunnel.exe";
  58.             shellinfo.Arguments = selectedssh;
  59.             shell.StartInfo = shellinfo;
  60.             shell.Start();
  61.  
  62.             Process shellPF = new Process();
  63.             ProcessStartInfo shellinfoPF = new ProcessStartInfo();
  64.             shellinfoPF.WindowStyle = ProcessWindowStyle.Hidden;
  65.             shellinfoPF.FileName = "\\Proxifier\\Proxifier.exe";
  66.             shellinfoPF.Arguments = selectedpf;
  67.             shellPF.StartInfo = shellinfoPF;
  68.             shellPF.Start();
  69.  
  70.  
  71.             button1.Enabled = false;
  72.                 button2.Enabled = true;
  73.                 textBox1.Enabled = false;
  74.                 textBox2.Enabled = false;
  75.                 textBox3.Enabled = false;
  76.                 textBox4.Enabled = false;
  77.                 textBox5.Enabled = false;
  78.             }
  79.  
  80.         private void button2_Click(object sender, EventArgs e)
  81.         {
  82.             /*Shell32.Shell Shell = new Shell32.Shell();
  83.             string T ="taskkill /f /im Tunnel.exe";
  84.             string p = "taskkill /f /im Proxifier.exe";
  85.             Process.Start("cmd /c" & T );
  86.             Process.Start("cmd /c" & p);*/
  87.             button1.Enabled = true;
  88.             button2.Enabled = true;
  89.             textBox1.Enabled = true;
  90.             textBox2.Enabled = true;
  91.             textBox3.Enabled = true;
  92.             textBox4.Enabled = true;
  93.             textBox5.Enabled = true;
  94.         }
  95.  
  96.         private void label10_Click(object sender, EventArgs e)
  97.         {
  98.             Process.Start("http://facebook.com");
  99.         }
  100.                
  101.  
  102.         }
  103.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement