Archived Forum Post

Index of archived forum posts

Question:

Submit form login via SSH Tunnel (Port Forwarding via direct-tcpip channel)

Jan 30 '15 at 13:09

I use Live HTTP Header to get this data

http://www.hayhaytv.vn/ajax_jsonp.php?p=jsonp_login
POST /ajax_jsonp.php?p=jsonp_login HTTP/1.1
Host: www.hayhaytv.vn
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko/20100101 Firefox/35.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 67
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
email=myemail%40gmail.com&password=mypass&remember_account=1

Because this website block ip address , I want submit above form login via SSH Tunnel , but I don't know how to make a path HTTP Request like to :

int channelNum;
channelNum = ssh.OpenDirectTcpIpChannel("www.chilkatsoft.com",80);
if (channelNum < 0) {
Console.WriteLine(ssh.LastErrorText);
return;
}
//  Build a simple HTTP GET request for http://www.chilkatsoft.com/xyz.html
string httpReq = "GET /xyz123.html HTTP/1.1\r\nHost: www.chilkatsoft.com\r\n\r\n";

Please help me , thanks for reading.