Thursday 7 November 2013

How to Detect Listen port Bitvise Ssh Client

Hi, finally i'm back to share posting "How to Detect Listen port Bitvise Ssh Client".

Why I'm share this posting?
Because i'm always use Bitvise to access my VPS on desktop, and i has build application that used Bitvise SSH. Then i have problem how to detect listen port of my bitvise profile is connected or not. I'm already looking on google how to that, but at the end I can not found it. So I have an idea with used third party application, that's "Paping".
What is Paping
Paping (pronounced pah ping) is a computer network administration utility used to test the reachability of a host on an Internet Protocol (TCP/IP) network and to measure the time it takes to connect to a specified port.

Syntax: paping [options] destination
Options:
  • -?, --help
  • -p, --port N
  •  -t, --timeout
  • -c, --count N
Bitvise services socks is TCP/IP listen interface, so that why i use paping command.
SSH port forwarding https://www.bitvise.com/port-forwarding


As you can see my SSH port forwarding is listen on 127.0.0.1 port 1081, below is the log if my SSH server success connected.
Question is how to automation my ssh with other application.
Oke let's begin, you must read our current article :
Our Application :
After that open our project "RedirectStandardOutput-Paping" , do some modified in Method OutputHandler 
I will send command paping to ping localhost/127.0.0.1 with port 1081
Command : 127.0.0.1 -p 1081

public void OutputHandler(object sendingProcess, DataReceivedEventArgs outLine)
        {
            SetText(outLine.Data);
//Add if conditional
if(outLine.Data.Contains("Connected")) MessageNox.Show("Your SSH Connected");
else(outLine.Data.Contains("Connection timed out")) MessageNox.Show("Your SSH Disconnected");
        }

Finally , rebuild your project.
Thank You

Wednesday 6 November 2013

How to Bypass Captcha binbox.io


About Binbox.io

Binbox started as a self-serve publisher network where you could earn money to share your links. They goals have always been to be the top-paying and most user-friendly pastebin. As of today we are one of the only pastebins that allows you to publish, earn, and advertise all from one network.

How It Works

They pay you when you create pastes and share the links through Binbox. When someone views your paste, we credit your account with the amount relevant to that visitor's country. Upon opening the paste, your visitors will complete a captcha and view ads that we run. You receive payment from the funds we receive from advertisers. The more people you bring to your pastes, the more you will earn.




Fast step how to bypassed captcha on binbox.io link, i used this step because sometimes response of submit button captcha were so long to redirect the paste text. In this step i used google chrome, or you can used the other browsers.

Ok let see the steps :
1. Open binbox.io link, wait until the loading is complete
2. Right click on text "Solve the aptcha below to prove you are human." then select Inspect element


3. Find 'div' class of "captcha-modal" ---> <div id="captcha-modal">


4. Right clik on <div id="captcha-modal"> and then select Delete node


------------------------Finish, Now you can see the paste text .





Thank you
sorry for my bad english .

Tuesday 8 October 2013

Csharp - Redirect Output of Process

RedirectStandardOutput eliminates the need for output files. It allows us to use a console program directly inside a C# program.

Related Article Process in C#:
C# (CSharp) Process - .NET Framework

I wanted to launch a script from a Windows Form application and display the standard output in a text box as the process was running. Surely you're not surprised to learn that multithreading is involved. It turns out you'll have at least four threads running to do this simple task.

A script or executable can be run using System.Diagnostics.Process. The string FileName is set to the executable (e.g. perl.exe, Run.bat, ConsoleApplication.exe). The string Arguments is set to the command-line arguments for that executable (e.g. perlscript.pl, filename1.txt filename2.txt, etc). The following code will start that executable.

I will use Paping executable on this example.
Here are syntax option paping.exe command
Now download Paping here and paste in your project folder bin\Debug
Design your Windows Form project

We have 1 Label , 2 TextBox and 2 Button
Code inside Form is

        delegate void SetTextCallback(string text);

        public Form1()
        {
            InitializeComponent();
        }
 
        private void SetText(string text)
        {
            // InvokeRequired required compares the thread ID of the
            // calling thread to the thread ID of the creating thread.
            // If these threads are different, it returns true.
            if (this.textBox1.InvokeRequired)
            {
                SetTextCallback d = new SetTextCallback(SetText);
                this.Invoke(d, new object[] { text });
            }
            else
            {
                this.textBox2.AppendText(text + Environment.NewLine);
            }
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            Process process;
            process = new Process();
            process.StartInfo.FileName = Application.StartupPath + "\\paping.exe";
            process.StartInfo.Arguments = textBox1.Text;
            process.StartInfo.UseShellExecute = false;
            process.StartInfo.CreateNoWindow = true;
            process.StartInfo.RedirectStandardOutput = true;
            process.OutputDataReceived += new DataReceivedEventHandler(OutputHandler);

            process.Start();
            process.BeginOutputReadLine();
        }

        public void OutputHandler(object sendingProcess, DataReceivedEventArgs outLine)
        {
            SetText(outLine.Data);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Process[] pcs_check = Process.GetProcessesByName("paping");
            if (pcs_check.Length > 0)
                foreach (var p in pcs_check)
                    p.Kill();
        }

The ouput of paping command
www.google.com -p 80 -c 4
it's mean ping address google with port 80 and count until 4 time.


Download full source project "RedirectStandardOutput-Paping"