luny

Can Someone help me, opening page in domain

7 posts in this topic

#1 ·  Posted

I want to open http://woodstock:9090/login.jsp?url=%2Findex.jsp and then it hsould enter my credentials, and then enter users, and minpulate users inside it. 

I have tried over 10 different ways,, it opens the page and does NOT enter data.. thisis the code from back of page, IM obviously missing somehting, 




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Openfire Admin Console</title>
	<script language="JavaScript" type="text/javascript">
		<!--
		// break out of frames
		if (self.parent.frames.length != 0) {
			self.parent.location=document.location;
		}
        function updateFields(el) {
            if (el.checked) {
                document.loginForm.username.disabled = true;
                document.loginForm.password.disabled = true;
            }
            else {
                document.loginForm.username.disabled = false;
                document.loginForm.password.disabled = false;
                document.loginForm.username.focus();
            }
        }
		//-->
	</script>
    <link rel="stylesheet" href="style/global.css" type="text/css">
    <link rel="stylesheet" href="style/login.css" type="text/css">
</head>

<body>

<form action="login.jsp" name="loginForm" method="post">



    <input type="hidden" name="url" value="/index.jsp">



<input type="hidden" name="login" value="true">

<div align="center">
    <!-- BEGIN login box -->
    <div id="jive-loginBox">
        
        <div align="center" id="jive-loginTable">

            <span id="jive-login-header" style="background: transparent url(images/login_logo.gif) no-repeat left; padding: 29px 0 10px 205px;">
            Administration Console
            </span>

            <div style="text-align: center; width: 380px;">
            <table cellpadding="0" cellspacing="0" border="0" align="center">
                <tr>
                    <td align="right" class="loginFormTable">

                        <table cellpadding="2" cellspacing="0" border="0">
                        <noscript>
                            <tr>
                                <td colspan="3">
                                    <table cellpadding="0" cellspacing="0" border="0">
                                    <tr valign="top">
                                        <td><img src="images/error-16x16.gif" width="16" height="16" border="0" alt="" vspace="2"></td>
                                        <td><div class="jive-error-text" style="padding-left:5px; color:#cc0000;">Error: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page.</div></td>
                                    </tr>
                                    </table>
                                </td>
                            </tr>
                        </noscript>
                        
                        <tr>
                            <td><input type="text" name="username" size="15" maxlength="50" id="u01" value=""></td>
                            <td><input type="password" name="password" size="15" maxlength="50" id="p01"></td>
                            <td align="center"><input type="submit" value="&nbsp; Login &nbsp;"></td>
                        </tr>
                        <tr valign="top">
                            <td class="jive-login-label"><label for="u01">username</label></td>
                            <td class="jive-login-label"><label for="p01">password</label></td>
                            <td>&nbsp;</td>
                        </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <div align="right" id="jive-loginVersion">
                        Openfire, Version: 3.7.1
                        </div>
                    </td>
                </tr>
            </table>
            </div>
        </div>

    </div>
    <!-- END login box -->
</div>

</form>

<script language="JavaScript" type="text/javascript">
<!--
    if (document.loginForm.username.value == '')  {
	    document.loginForm.username.focus();
    } else {
        document.loginForm.password.focus();
    }
//-->
</script>

</body>
</html

Share this post


Link to post
Share on other sites



#2 ·  Posted

Here is what I got so far.. one of 10 I have tried

#include <IE.au3>

Local $sUsername = 'lit'
Local $sPassword = 'abc'
Local $oIE = _IECreate("http://woodstock:9090/login.jsp?url=%2Findex.jsp", 1)
Local $oInputs = _IETagNameGetCollection($oIE, "Input")
For $oInput In $oInputs
    If $oInput.name = 'username' Then $oInput.value = $sUsername
    If $oInput.name = 'password' Then $oInput.value = $sPassword
    If $oInput.type = 'submit' Then _IEAction($oInput, "Click")
Next

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

As mentioned in your previous post, the code above works fine if you save the html locally so its more like an environment issue, for example you may have security in place on the webserver that stops insecure logins for example see "Reply to Unable to click submit button"

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

This would be my first attempt based upon the HTML you posted --

#include <IE.au3>

$sUsername = 'lit'
$sPassword = 'abc'

$oIE = _IECreate("http://woodstock:9090/login.jsp?url=%2Findex.jsp", 1)

$oForm =_IEFormGetObjByName($oIE, "loginForm")
$oName  = _IEFormElementGetObjByName($oForm, "username")
$oPass  = _IEFormElementGetObjByName($oForm, "password")

_IEFormElementSetValue($oName, $sUsername)
_IEFormElementSetValue($oPass, $sPassword)
_IEFormSubmit($oForm)

 

Share this post


Link to post
Share on other sites

#5 ·  Posted

@Danp2 Wrote this in luny previous post, but for some reason it doesn't work for him so I assume its environment based.

 

Share this post


Link to post
Share on other sites

#6 ·  Posted

@Subz Thanks... didn't realize there was an earlier thread. Agree with your earlier request regarding the need for results from the Scite output window.

Share this post


Link to post
Share on other sites

#7 ·  Posted

Ill check into it ,, thank you,, I was seriously brain farting, sorry

 

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • luny
      By luny
      Hello all, this is what I got so far .. it opens and It won't put in words, I need to log in,,  oops didnt put in code. LOL
       
      #include <IE.au3>
      Local $oUser, $oPass, $oSubmit
      Local $sUser = "lit"
      Local $sPass = "abc"
      Local $url = "http://woodstock:9090/login.jsp?url=%2Findex.jsp"
       

      Local $oIE = _IECreate($url, 1)

      _IELoadWait($oIE)
      $oInputs = _IETagNameGetCollection($oIE, "input")
      for $oInput in $oInputs
          if $oInput.type = "text" And $oInput.name = "userid" And $oInput.size = "12" Then $oUser = $oInput
          if $oInput.type = "password" And $oInput.name = "password" And $oInput.size = "12" Then $oPass = $oInput
          if $oInput.type = "submit" And $oInput.value = "loginformtable" Then $oSubmit = $oInput
          if isObj($oUser) And isObj($oPass) And isObj($oSubmit) then exitloop
      Next
      $oUser.value = $sUser
      $oPass.value = $sPass
      _IEAction($oSubmit, "click")
      _IELoadWait($oIE)
       
       
      1