I am trying to access a website using the winsock control. Apparently, the website uses javascript. I can connect fine, and I receive the data fine. However, right after I connect, I get these 3 things:
HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Wed, 24 Jan 2007 22:16:51 GMT
Connection: close
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
//-->
</script>
<script src=../i.txt></script><script>st()</script>
After receiving this data, I am disconnected. I cannot figure out why. Am I supposed to re-connect and continue sending my data? Or am I missing something? All help is appreciated :)
edit: if you think it has something to do with the "i.txt", you can view it at http://racewarkingdoms.com/i.txt
It looks like your Norton Internet Security firewall is intercepting your HTTP data and injecting the JavaScript popup blocker that sucks balls.
hmmm...well, when i disable Norton, I get this data instead:
HTTP/1.1 200 OK
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Thu, 25 Jan 2007 11:33:12 GMT
Connection: close
<script src=../i.txt></script><script>st()</script>
But the connection still closes. :( If you look at st(), it is the function that draws out the html for the game interface. Perhaps I should elaborate. I am trying to login to the game using a winsock control and then perform actions... but I can't even login lol.
When I packetlog a browser logging in, it looks like after it receives that, it does a GET for i.txt. Should I be doing this as well?
Yes...
Just a thought, in your first <script> tag, the one with src=, add type="text/javascript".
im not sure if this is supposed to happen or not but i just re-connect, request i.txt, and proceed from there. i randomly get HTTP error 400 though