Jump to content
UBot Underground

Http Plugin - Signip Issue


Recommended Posts

Hello.

 

I try to create a define to signup to www.xing.com

 

Here is the http communication:

Accept: text/javascript, text/html, application/xml, text/xml, */*
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Cookie: s_sq=xingcomprod%3D%2526pid%253Dlo%25252Fstart%25252Findexpage%2526pidt%253D1%2526oid%253DKostenlos%252520registrieren%2526oidt%253D3%2526ot%253DSUBMIT
Host: www.xing.com
Content-Length: 195
Connection: Keep-Alive
 
op=minireg_validate&captcha_secret=&logged_out_sid=f4491e7545f2a2cc116f3e4f83c73a40&source_url=&first_name=Komalpreetasd&last_name=asdasdas&email=dasdasdasdasdhuiaiusdh%40gmail.com&tandc_check=on
 
 
 
The response:
HTTP/1.1 200 OK
Cache-Control: private
Pragma: no-cache
Expires: Now
Vary: Accept-Encoding
Content-Type: application/json
X-UA-Compatible: IE=edge
X-XSS-Protection: 1; mode=block; report=https://www.xing.com/tools/xss_reporter
Date: Thu, 01 May 2014 23:15:29 GMT
Content-Length: 131
Connection: keep-alive
Set-Cookie: c_=0x7C4A3DA0D18611E3A84D778999B42FC2; domain=.xing.com; path=/; expires=Thu Apr 27 01:15:29 2034; HttpOnly
Set-Cookie: dtCookie=|XING-GROWTH|0; Path=/; Domain=.xing.com
 
({"captcha_required":1,"success":0,"email":"Mit dieser E-Mail-Adresse ist bereits ein Mitglied registriert.","inputFocus":"email"})
 
 
 
Here is my Ubot code:
  set(#get$plugin function("HTTP post.dll""$http get""https://www.xing.com/""Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36""""", 20), "Global")
    set(#loggedoutsid$plugin function("HTTP post.dll""$xpath parser index"#get"//input[@name=\'logged_out_sid\']", 0, "value"), "Global")
    set(#firstname"Komalpreetasd""Global")
    set(#lastname"asdasdas""Global")
    set(#email"dasdasdasdasdhuiaiusdh%40gmail.com""Global")
    set(#password"MeinPasswort""Global")
    set(#post$plugin function("HTTP post.dll""$http post""https://www.xing.com/app/signup""op=minireg_validate&captcha_secret=&logged_out_sid={#loggedoutsid}&source_url=&first_name={#firstname}&last_name={#lastname}&email={#email}&password={#password}&tandc_check=on""Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36""https://www.xing.com/""", 20), "Global")
    load html(#post)
 
 
This is the HTTP Post the ubot code generates:
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*; q=0.7
Content-Type: application/x-www-form-urlencoded
Host: www.xing.com
Cookie: dtCookie=|XING|0
Content-Length: 217
 
op=minireg_validate&captcha_secret=&logged_out_sid=33c54625535873eb31e7db0232853cfb&source_url=&first_name=Komalpreetasd&last_name=asdasdas&email=dasdasdasdasdhuiaiusdh%40gmail.com&password=MeinPasswort&tandc_check=on

 

 

But it's not working. 

 

 

 

I have it working in C#:

 

private void MakeRequests()
{
HttpWebResponse response;
 
if (Request_www_xing_com(out response))
{
response.Close();
}
}
 
private bool Request_www_xing_com(out HttpWebResponse response)
{
response = null;
 
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.xing.com/app/signup");
 
request.KeepAlive = true;
request.Accept = "text/javascript, text/html, application/xml, text/xml, */*";
request.Headers.Add("Origin", @"https://www.xing.com");
request.Headers.Add("X-Requested-With", @"XMLHttpRequest");
request.UserAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36";
request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
request.Referer = "https://www.xing.com/";
request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip,deflate,sdch");
request.Headers.Set(HttpRequestHeader.AcceptLanguage, "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4");
 
request.Method = "POST";
request.ServicePoint.Expect100Continue = false;
 
string body = @"op=minireg_validate&captcha_secret=&logged_out_sid=f4491e7545f2a2cc116f3e4f83c73a40&source_url=&first_name=Komalpreetasd&last_name=asdasdas&email=dasdasdasdasdhuiaiusdh%40gmail.com&tandc_check=on";
byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body);
request.ContentLength = postBytes.Length;
Stream stream = request.GetRequestStream();
stream.Write(postBytes, 0, postBytes.Length);
stream.Close();
 
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException e)
{
if (e.Status == WebExceptionStatus.ProtocolError) response = (HttpWebResponse)e.Response;
else return false;
}
catch (Exception)
{
if(response != null) response.Close();
return false;
}
 
return true;
}

 

 
 
Would be great if someone has an idea what I'm missing in the ubot code?
 
Thanks in advance for your help
Dan
 

 

Link to post
Share on other sites
  • 11 months later...

One thing I see is that you are missing the accept-language header. I can't figure out a way to set that in ubot using aymens plugin. When I do :

 

plugin command("HTTP post.dll""http set headers""Accept-Language""en-US,en;q=0.8")

 

It doesn't get set and if I do:

 

plugin command("HTTP post.dll""http set headers""Accept Language""en-US,en;q=0.8")     Without the hyphen, it throws an error when ran.

Link to post
Share on other sites
  • 8 years later...
On 4/19/2015 at 10:20 PM, Bot-Factory said:

That thread is 1 year old... The issue was fixed a long time ago :-)

Having the same issue at moment, 

i have set it, nevertheless it doesn't arrive. 

Going through a proxy, it does get sent on each of the previous and following requests, but not at this request: http upload.

instead of the accept-language i'll get this: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*; q=0.7

Already tried many things up down, left right, add some, remove some, my current request looks like

plugin command("HTTP post.dll", "http clear headers")
plugin command("HTTP post.dll", "http settings headers", "Content Type", $nothing)
plugin command("HTTP post.dll", "http set headers", "Accept", "application/json;format=camelcase")    
plugin command("HTTP post.dll", "http set headers", "Accept-Language", "en-US,en;q=0.5")
plugin command("HTTP post.dll", "http set headers", "Accept-Encoding", "gzip;q=0,deflate")        
plugin command("HTTP post.dll", "http set headers", "Origin", "https://www.somesite.com")    
plugin command("HTTP post.dll", "http settings headers", "Host", "www.somesite.com")
plugin command("HTTP post.dll", "http set headers", "X-CSRF", #xcsrftoken)    
plugin command("HTTP post.dll", "http set headers", "Authorization", "Bearer {#apitoken}")
plugin command("HTTP post.dll", "http settings headers", "Content-Type", "multipart/form-data;")
plugin command("HTTP post.dll", "http settings headers", "Content-Disposition", #content)
set(#json,$plugin function("HTTP post.dll", "$http upload", "https://www.somesite.com/...", #not, #uplolol, "file", #ft, #ua, "https://www.somesite.com/...", #prx, #utimeout),"Local")


which gives


POST https://www.somesite.com HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------bla
User-Agent: bla
Referer: https://www.somesite.com
Accept-Encoding: gzip,deflate
Upgrade-Insecure-Requests: 1
Authorization: Bearer bla
Accept: application/json;format=camelcase
Origin: https://www.somesite.com
X-CSRF: bla.bla
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*; q=0.7
Host: www.somesite.com
Cookie: sid=bla
Content-Length: 14241532


-----------------------------bla
Content-Disposition: form-data; name="file"; filename="C:\also_here_it_noted\the_full_path\but_i_\sent_only_the_filename\image.jpg"
Content-Type: image/jpeg

Will anybody remember what the solution was, after all this years? Many thanks in advance!

cheers

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...