/    Sign up×
Community /Pin to ProfileBookmark

scripted login at external site

Dear all,
I have an ip device that requires login. It has a form which uses javascript.
I want to login to this device from a script from somewhere on the web. Is it possible to pass in the username and password as params?
I’ve extracted the following from the login form of the ip device…

<head>
<script type=’text/javascript’ src=”../html/js/alphaindex.js”></script>
<script Language=”JavaScript”>

function DoLogin()
{
document.formLogin.elements[2].value=document.usrInput.username.value;
document.formLogin.elements[3].value=document.usrInput.password.value;
document.formLogin.submit();
}

var focusTarget=-999;
var focusButton;
var ns=(navigator.appName==”Netscape”?1:0);
var ver=parseInt(navigator.appVersion)
document.onkeydown=whichF;

function chkKey(e)
{
var chk=(ns?focusTarget:event.keyCode);
if (chk==13)
{
DoLogin();
}
return true;

}

</script>
</head>
<body>

<form method=”POST” action=”../cgi-bin/webcm” name=”formLogin”>
<input type=”hidden” name=”getpage” value=”../html/home.htm”>
<input type=”hidden” name=”errorpage” value=”../html/index.html” >
<input type=”hidden” name=”login:command/username” value=”admin” >
<input type=”hidden” name=”login:command/password” value=”” >
<input type=”hidden” name=”var:errormsg” value=”Error”>
</form>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@lmccord2Aug 09.2004 — Yes, you can. But I need the page in which this login is.
Copy linkTweet thisAlerts:
@webphongauthorAug 09.2004 — www.phong.myvnc.com

But I've been notified that this doesnt work at the moment.

Please could you explain what would be required given that the url works?

thanks.
×

Success!

Help @webphong spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...