Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 19:44

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



can someone make me this code

Discussion on can someone make me this code within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2011
Posts: 278
Received Thanks: 67
can someone make me this code

i need code that gets source code of .
using chrome useragen=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
sander2828 is offline  
Old 08/15/2013, 20:58   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
This maybe?
Code:
TCPStartup()

$hServer = TCPConnect(TCPNameToIp("us1.darkorbit.bigpoint.com"), 80)
If $hServer = -1 Then Exit

TCPSend($hServer, "GET /index.es?action=externalHome&loginError=99 HTTP/1.1" & @CRLF & "Host: us1.darkorbit.bigpoint.com" & @CRLF & "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36" & @CRLF & @CRLF)

Local $sReceived

Do
	$sReceived &= TCPRecv($hServer, 1024)
Until StringInStr($sReceived, "</html>")

TCPCloseSocket($hServer)
TCPShutdown()

If StringInStr($sReceived, "<!DOCTYPE") Then $sHTML = StringTrimLeft($sReceived, StringInStr($sReceived, "<!DOCTYPE") - 1)
FileWrite(".\\Website.html", $sHTML)
By the way: the website referrs to /index.es?action=externalHome&loginError=99.
alpines is offline  
Old 08/15/2013, 22:19   #3
 
elite*gold: 0
Join Date: Feb 2011
Posts: 278
Received Thanks: 67
Quote:
Originally Posted by alpines View Post
This maybe?
Code:
TCPStartup()

$hServer = TCPConnect(TCPNameToIp("us1.darkorbit.bigpoint.com"), 80)
If $hServer = -1 Then Exit

TCPSend($hServer, "GET /index.es?action=externalHome&loginError=99 HTTP/1.1" & @CRLF & "Host: us1.darkorbit.bigpoint.com" & @CRLF & "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36" & @CRLF & @CRLF)

Local $sReceived

Do
	$sReceived &= TCPRecv($hServer, 1024)
Until StringInStr($sReceived, "</html>")

TCPCloseSocket($hServer)
TCPShutdown()

If StringInStr($sReceived, "<!DOCTYPE") Then $sHTML = StringTrimLeft($sReceived, StringInStr($sReceived, "<!DOCTYPE") - 1)
FileWrite(".\\Website.html", $sHTML)
By the way: the website referrs to /index.es?action=externalHome&loginError=99.
ty i know it needs &dosid at the end

hmm it does not write me the file

Code:
TCPStartup()

$hServer = TCPConnect(TCPNameToIp("http://us1.darkorbit.bigpoint.com"), 80)
If $hServer = -1 Then Exit

TCPSend($hServer, "GET /indexInternal.es?action=internalStart&dosid=[dosidhere] HTTP/1.1" & @CRLF & "Host: us1.darkorbit.bigpoint.com" & @CRLF & "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36" & @CRLF & @CRLF)

Local $sReceived

Do
	$sReceived &= TCPRecv($hServer, 1024)
Until StringInStr($sReceived, "</html>")

TCPCloseSocket($hServer)
TCPShutdown()

If StringInStr($sReceived, "<!DOCTYPE") Then $sHTML = StringTrimLeft($sReceived, StringInStr($sReceived, "<!DOCTYPE") - 1)
FileWrite(@ScriptDir&"\Website.txt", $sHTML)
sander2828 is offline  
Old 08/15/2013, 22:44   #4
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Don't you dare touch my source-code!
Of course it won't run, I already told you why it won't.

Quote:
Originally Posted by alpines
By the way: the website referrs to /index.es?action=externalHome&loginError=99.
Did you try to login on the website (in your browser) and tried to access the link?
It may not work in the script because you aren't signed in.

The problem why it doesn't write is because the server only says 302 Found,
which means that it won't send you a html-file.

It referrs you to the website.
Unfortunetaly it won't work on TCP.

If you try to access it via WinHttp (which referrs) then the server will redirect you to the Error page but that's not what you want.
alpines is offline  
Old 08/15/2013, 23:09   #5
 
elite*gold: 0
Join Date: Feb 2011
Posts: 278
Received Thanks: 67
Quote:
Originally Posted by alpines View Post
Don't you dare touch my source-code!
Of course it won't run, I already told you why it won't.



Did you try to login on the website (in your browser) and tried to access the link?
It may not work in the script because you aren't signed in.

The problem why it doesn't write is because the server only says 302 Found,
which means that it won't send you a html-file.

It referrs you to the website.
Unfortunetaly it won't work on TCP.

If you try to access it via WinHttp (which referrs) then the server will redirect you to the Error page but that's not what you want.
if u make winhttp got to page:http:://us1.darkorbit.bigpoint.com/indexInternal.es?action=internalStart&acceptDailyL oginBonus=1&dosid=[dosidhere] it should go there
dosid you can get after loging in and looking it from page source
EDIT; jsut tested the link with shellexecute eaven if i am logged in in chrome it opened firefox and got me to right page
sander2828 is offline  
Reply


Similar Threads Similar Threads
How To Make An Autobuyer (PHP CODE) FIFA
12/08/2012 - Fifa - 3 Replies
This post does not contain an AutoBuyer. It does contain PHP code that would allow you to create an AutoBuyer very easily. This first portion allows you to search for players and staff <?PHP /** * @ * @ * @ * @
why the Guys who can code WT (hack) Don't Make It Free
06/06/2011 - Wolfteam - 9 Replies
http://i1002.photobucket.com/albums/af141/topfox20 10/ARB%20DiscRtion/1-19.png Hey All i just Wont To Know Why The Coders Makes The Hack And Sell it With High prices In CrossFire Their Coders Makes Hacks FOR Free And With Low Prices In Others Games To
[help]solution make code shorter
04/15/2011 - AutoIt - 0 Replies
my code is very long and it didnt work well when i add more than 6 function. How can I make it better? #include <GUIConstants.au3> #include <NomadMemory.au3> ;because you need this for _memread functions dim $a GUICreate("My GUI Button") ;mob 23//////////////////////////////////////////// $Label_1 = GUICtrlCreateLabel("unknown",15, 105,100,15) $Label_2 = GUICtrlCreateLabel("0/0",15, 120,100,15)



All times are GMT +1. The time now is 19:46.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.