Jump to content

Recommended Posts

Posted

im trying to make an auto login script for a site called: ogame ( www.ogame.nl)

when i look at the source i see this:

<FRAME name=mainframe src="/index.php?frameset=1" frameBorder=0 noResize scrolling=yes><FRAME name=trk src="http://analytics.gameforge.de/cp.php?game=ogame&action=visit&gr=&lang=nl&kid=" frameBorder=0 noResize>

Now i want to access the mainframe. Now i let IE-builder search for the source code in www.ogame.nl/index.php?frameset=1

Cause thats the link of the mainframe. Then i get this:

<FRAME src="portal/?lang=nl&frameset=1" frameBorder=0 noResize scrolling=yes>

Yes just that..

So i guess i need to access that frame too.

When i look for the sourcecode i see a couple of input boxes in the source. One for the account and one for the password.

And a option select. The source code:

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top></TD>
<TD vAlign=top width="100%">
<CENTER>
<TABLE cellSpacing=0 cellPadding=0 width="80%">
<TBODY>
<TR style="BACKGROUND-IMAGE: url(img/head/back.gif)">
<TD width=339><IMG alt="" src="img/head/left.jpg"></TD>
<TD width="100%"> </TD>
<TD width=320><IMG alt="" src="img/head/right.jpg"></TD></TR></TBODY></TABLE>
<TABLE class=lcd style="BACKGROUND-IMAGE: url(img/main/bglcd.gif)" cellSpacing=0 cellPadding=0 width="80%" border=0>
<TBODY>
<TR>
<TD style="BACKGROUND-IMAGE: url(img/border/left_back.gif)" vAlign=top width=20><IMG alt="" src="img/border/left_top.gif"></TD>
<TD style="BACKGROUND-IMAGE: url(img/border/navi_back.gif)" vAlign=top align=middle width=131><A onmouseover="MM_swapImage('image1','','img/navigation/nl/02o.gif',1)" onmouseout=MM_swapImgRestore() href="?go=start&lang=nl" target=_self><IMG id=image1 height=28 alt="Start pagina" src="img/navigation/nl/02.gif" width=131 border=0 name=image1></A> <A onmouseover="MM_swapImage('image2','','img/navigation/nl/04o.gif',1)" onmouseout=MM_swapImgRestore() href="http://board.ogame.nl/board.php?boardid=45" target=_blank><IMG id=image2 height=28 alt=Nieuws src="img/navigation/nl/04.gif" width=131 border=0 name=image2></A> <A onmouseover="MM_swapImage('image3','','img/navigation/en/26o.gif',1)" onmouseout=MM_swapImgRestore() href="?go=screenshots&lang=nl" target=_self><IMG id=image3 height=28 alt=Screenshots src="img/navigation/en/26.gif" width=131 border=0 name=image3></A> <A onmouseover="MM_swapImage('image4','','img/navigation/nl/12o.gif',1)" onmouseout=MM_swapImgRestore() href="?go=team&lang=nl" target=_self><IMG id=image4 height=28 alt=Team src="img/navigation/nl/12.gif" width=131 border=0 name=image4></A> <A onmouseover="MM_swapImage('image5','','img/navigation/nl/99o.gif',1)" onmouseout=MM_swapImgRestore() href="http://pr.ogame.org/" target=_blank><IMG id=image5 height=28 alt=prOgame src="img/navigation/nl/99.gif" width=131 border=0 name=image5></A> <A onmouseover="MM_swapImage('image6','','img/navigation/nl/14o.gif',1)" onmouseout=MM_swapImgRestore() href="?go=downloads&lang=nl" target=_self><IMG id=image6 height=28 alt=Downloads src="img/navigation/nl/14.gif" width=131 border=0 name=image6></A> <A onmouseover="MM_swapImage('image7','','img/navigation/nl/10o.gif',1)" onmouseout=MM_swapImgRestore() href="http://board.ogame.nl/" target=_blank><IMG id=image7 height=28 alt=Forum src="img/navigation/nl/10.gif" width=131 border=0 name=image7></A> <BR><IFRAME id=a094d0b4 name=a094d0b4 frameSpacing=0 src="http://ads.gameforgeads.de/adframe.php?n=a094d0b4&what=zone:696" frameBorder=no width=120 scrolling=no height=240></IFRAME></TD>
<TD vAlign=top width=13 background=img/border/middle_back.gif><IMG alt="" src="img/border/middle_top.gif"></TD>
<TD vAlign=top align=middle width="100%" rowSpan=2>
<TABLE height=43 cellSpacing=0 cellPadding=0 width="100%">
&lt;script type=text/javascript>
    var lastType = "";
    function changeAction(type) {
        if(document.formular.Uni.value == '') {
            alert('Je hebt geen universum gekozen!');
        }
        else {
            if(type == "login" && lastType == "") {
                var url = "http://" + document.formular.Uni.value + "/game/reg/login2.php";
                document.formular.action = url;
            }
            else {
                var url = "http://" + document.formular.Uni.value + "/game/reg/mail.php";
                document.formular.action = url;
            document.formular.submit();
            }
        }
    }
    </SCRIPT>

<FORM name=formular onsubmit="changeAction('login');" action="" method=post><INPUT type=hidden value=1172047804 name=timestamp> <INPUT type=hidden value=2 name=v> 
<TBODY>
<TR>
<TD vAlign=top align=middle background=img/main/login_back.gif><BR>
<TABLE cellSpacing=0 cellPadding=0 width="97%">
<TBODY>
<TR>
<TD><IMG src="img/main/arrow.gif"></TD>
<TD><SELECT class=eingabe style="WIDTH: 150px" tabIndex=1 name=Uni> <OPTION value="" selected>Kies universum...</OPTION><OPTION value=ogame168.de>1. universum</OPTION><OPTION value=81.169.131.150>2. universum</OPTION><OPTION value=ogame341.de>3. universum</OPTION><OPTION value=ogame340.de>4. universum</OPTION><OPTION value=ogame434.de>5. universum</OPTION><OPTION value=85.214.22.149>6. universum</OPTION><OPTION value=ogame402.de>7. universum</OPTION><OPTION value=ogame426.de>8. universum</OPTION><OPTION value=ogame492.de>9. universum</OPTION><OPTION value=80.237.204.69>10. universum</OPTION><OPTION value=ogame603.de>11. universum</OPTION><OPTION value=s041.gfsrv.net>12. universum</OPTION></SELECT>
&lt;script type=text/javascript> document.formular.Uni.focus(); </SCRIPT>
 </TD>
<TD><IMG alt=Username src="img/main/arrow2.gif"> </TD>
<TD><NOBR><SPAN class=rahmen><INPUT class=eingabe tabIndex=2 alt=Login name=login></SPAN> <SPAN class=rahmen><INPUT class=eingabe tabIndex=3 type=password alt=Passwort maxLength=20 value="" name=pass></SPAN></NOBR> </TD>
<TD><INPUT type=image height=15 width=40 src="img/main/login.gif" value=Login border=0> </TD>
<TD align=left width="100%"><SPAN class=rahmen></SPAN></TD></TR>
<TR>
<TD align=left colSpan=4><SPAN class=black_small><BR>Met mijn login accepteer ik de <A href="?go=agb&lang=nl">voorwaarden</A>.  | </SPAN> <A class=footer_link href="?go=register&lang=nl">registreer</A> <SPAN class=black_small> | </SPAN> <A class=footer_link href="java script:changeAction('password');">wachtwoord vergeten?</A></TD></TR></FORM></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width="98%">
<TBODY>
<TR>
<TD width=120 height=90>
<TABLE cellSpacing=0 cellPadding=0 width=124>
<TBODY>
<TR>
<TD width=2 height=2><IMG height=2 src="img/main/border/top_left.gif" width=2></TD>
<TD background=img/main/border/top.gif><IMG height=2 src="img/main/border/top.gif" width=1></TD>
<TD width=2 height=2><IMG height=2 src="img/main/border/top_right.gif" width=2></TD></TR>
<TR>
<TD background=img/main/border/left.gif><IMG height=1 src="img/main/border/left.gif" width=2></TD>
<TD background=img/main/border/black_trans.gif><IMG height=90 alt=Start src="img/main/bilder/startbild.jpg" width=120></TD>
<TD background=img/main/border/right.gif><IMG height=1 src="img/main/border/right.gif" width=2></TD></TR>
<TR>
<TD width=2 height=2><IMG height=2 src="img/main/border/bottom_left.gif" width=2></TD>
<TD background=img/main/border/bottom.gif><IMG height=2 src="img/main/border/bottom.gif" width=1></TD>
<TD width=2 height=2><IMG height=2 src="img/main/border/bottom_right.gif" width=2></TD></TR></TBODY></TABLE></TD>
<TD width=7><IMG height=1 src="img/main/1x1.gif" width=7></TD>
<TD vAlign=top>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD width=2 height=2><IMG height=2 src="img/main/border/top_left.gif" width=2></TD>
<TD background=img/main/border/top.gif height=2><IMG height=2 src="img/main/border/top.gif" width=1></TD>
<TD width=2 height=2><IMG height=2 src="img/main/border/top_right.gif" width=2></TD></TR>
<TR>
<TD style="HEIGHT: 84px" align=top background=img/main/border/left.gif><IMG height=1 src="img/main/border/left.gif" width=2></TD>
<TD class=normtext style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; HEIGHT: 80px" vAlign=top align=left background=img/main/border/black_trans.gif>
<P align=justify><SPAN class=sizeh3><B><A href="http://s041.gfsrv.net//game/reg/new.php" target=_self>Speel nu gratis</A></B></SPAN><B></B><B><BR></B>voor nieuw <A href="http://s041.gfsrv.net//game/reg/new.php">universum 12</A> of <A href="?go=register&lang=nl">een ander universum</A> en treed binnen in de fantastische wereld van OGame!</P></TD>
<TD style="HEIGHT: 84px" background=img/main/border/right.gif><IMG height=1 src="img/main/border/right.gif" width=2></TD></TR>
<TR>
<TD width=2 height=2><IMG height=2 src="img/main/border/bottom_left.gif" width=2></TD>
<TD background=img/main/border/bottom.gif><IMG height=2 src="img/main/border/bottom.gif" width=1></TD>
<TD width=2 height=2><IMG height=2 src="img/main/border/bottom_right.gif" width=2></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="98%">
<TBODY>
<TR>
<TD width=20><IMG alt="" src="img/main/arrow.gif"></TD>
<TD align=left><SPAN class=sizeh1><B>Welkom bij OGame</B></SPAN></TD></TR></TBODY></TABLE>
<TABLE class=content cellSpacing=0 cellPadding=0 width="98%">
<TBODY>
<TR>
<TD>
<DIV style="BORDER-RIGHT: rgb(153,153,153) 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: rgb(153,153,153) 1px solid; PADDING-LEFT: 10px; FLOAT: right; BACKGROUND-IMAGE: url(http://pr.ogame.org/progame_logo250.jpg); PADDING-BOTTOM: 10px; MARGIN: 0pt 0pt 20px 20px; BORDER-LEFT: rgb(153,153,153) 1px solid; WIDTH: 230px; PADDING-TOP: 100px; BORDER-BOTTOM: rgb(153,153,153) 1px solid; BACKGROUND-REPEAT: no-repeat; BACKGROUND-COLOR: rgb(6,18,41); TEXT-ALIGN: left">
<H2 style="FONT-SIZE: 20px; MARGIN: 0px; COLOR: rgb(158,189,228)">Can you keep up?</H2>
<P style="MARGIN: 0px">Then join the Professionals! </P>
<UL>
<LI><STRONG>Faster!</STRONG> 
<LI><STRONG>Tougher!</STRONG> 
<LI>The biggest <STRONG>international</STRONG> challenge yet! </LI></UL>
<P style="FONT-WEIGHT: bold; TEXT-ALIGN: center">Fight the best! Prove yourself now.<BR><A style="FONT-SIZE: 1.6em" href="http://pr.ogame.org">Sign up here</A></P></DIV><SPAN class=sizeh1><B>Welkom bij OGame</B></SPAN><BR>
<P style="TEXT-ALIGN: justify"><SPAN style="COLOR: rgb(255,0,0)"></SPAN><SPAN style="COLOR: rgb(204,0,0)"></SPAN>OGame is een strategisch ruimte simulatie spel met duizenden spelers die tegelijkertijd met elkaar strijden. Alles wat je nodig hebt om te spelen is een standaard web browser.</P>
<P style="TEXT-ALIGN: justify"><SPAN class=sizeh1>Waar gaat OGame over?</SPAN><BR>Als een intergalactische koning heb je de mogelijkheid om je invloed door de melkwegen te versterken door middel van verschillende strategieën. Je begint je regering op je thuis planeet waar je met behulp van je grondstoffen een economische en militaire infrastructuur opbouwt. Het doen van onderzoek naar nieuwe technieken en het verbeteren van je gebouwen geeft je toegang tot verbeterde technieken en verbeterde wapen systemen. Gedurende het spel heb je de mogelijkheid om planeten te koloniseren en om allianties te vormen met vriendelijke koningen. Handel met andere spelers en vechten tegen vijandige koninkrijken helpen om de benodigde grondstoffen te verkrijgen die je nodig hebt om nog sneller te groeien.</P><BR></TD></TR></TBODY></TABLE></TD>
<TD style="BACKGROUND-IMAGE: url(img/border/right_back.gif)" vAlign=top width=20><IMG height=61 src="img/border/right_top.gif" width=20></TD></TR>
<TR>
<TD vAlign=bottom background=img/border/left_back.gif><IMG alt="" src="img/border/left_bottom.gif"></TD>
<TD vAlign=top align=middle background=img/border/navi_back.gif> </TD>
<TD vAlign=bottom background=img/border/middle_back.gif><IMG alt="" src="img/border/middle_bottom.gif"></TD>
<TD vAlign=bottom width=20 background=img/border/right_back.gif><IMG alt="" src="img/border/right_bottom.gif"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="80%">
<TBODY>
<TR>
<TD width=159><IMG alt="" src="img/footer/left.gif"></TD>
<TD style="BACKGROUND-IMAGE: url(img/footer/middle.gif)" width="100%"> </TD>
<TD width=65><IMG alt="" src="img/footer/right.gif"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="80%">
<TBODY>
<TR>
<TD width=68><IMG alt="" src="img/footer/bottom1_left.gif"></TD>
<TD width="100%" background=img/footer/bottom1_back.gif>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD align=left>© 2005 by <A class=footer_link href="http://www.gameforge.de" target=_blank>Gameforge GmbH </A></TD>
<TD align=right><A class=footer_link href="?go=story&lang=nl" target=_self>Verhaal</A> | <A class=footer_link href="?go=rules&lang=nl" target=_self>Regels</A> | <A class=footer_link href="?go=agb&lang=nl" target=_self>Voorwaarden</A> | <A class=footer_link href="?go=contact&lang=nl" target=_self>Contact</A></TD></TR></TBODY></TABLE></TD>
<TD width=65><IMG alt="" src="img/footer/bottom1_right.gif"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="80%">
<TBODY>
<TR>
<TD width=68 height=8><IMG alt="" src="img/footer/bottom2_left.gif"></TD>
<TD style="BACKGROUND-IMAGE: url(img/footer/bottom2_back.gif)" width="100%"><IMG alt="" src="img/footer/bottom2_back.gif"></TD>
<TD width=64 height=8><IMG alt="" src="img/footer/bottom2_right.gif"></TD></TR></TBODY></TABLE></CENTER></TD></TR></TBODY></TABLE><BR>
<CENTER></CENTER><!-- written to cache 21.02.2007 09:50:24 //--><!-- delivered by  ws1 //-->

To select the right universe i came up with this:

#include <IE.au3>

#Region --- IE-Builder generated code Start ---
$sUrl = "www.ogame.nl"
$oIE = _IECreate($sUrl)
$oFrame1 = _IEFrameGetObjByName($oIE, "mainframe")
$oFrame2 = _IEFrameGetCollection($oFrame1, "0")
$oForm1 = _IEFormGetObjByName($oFrame2, "formular", "0")
_IEFormElementOptionselect($oForm1, "ogame434.de", 1, "byvalue", 1)

Why doesnt it work?

I seems to me im doing everything right.

Posted

i solved the problem myself. This topic can be closed :whistle:

Good job.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...