PowerShell: Sign into a website
i have been trying write script log website following html code
<div class="overlay" align="center"> <table class="positioning" align="center"> <tr> <td> <table id="credentials" align="right"> <tr> <td class="label">username </td> <td><input type="text" id="752664021706226201" name="752664021706226201" value="" size="20" maxlength="255" onkeypress="if(window.event) keyvalue = event.keycode; else keyvalue = event.which; if(keyvalue == 13) { addmessage('framework', 'object', [{name: 'identifier', type: 'string', value: '752664021706226201'}, {name: 'action', type: 'string', value: 'enter'}]); sendmessagequeue();}" /></td> </tr> <tr> <td class="label">password </td> <td><input type="password" id="55447082617015795402" name="55447082617015795402" value="" size="20" maxlength="255" onkeypress="if(window.event) keyvalue = event.keycode; else keyvalue = event.which; if(keyvalue == 13) { addmessage('framework', 'object', [{name: 'identifier', type: 'string', value: '55447082617015795402'}, {name: 'action', type: 'string', value: 'enter'}]); sendmessagequeue();}" /></td> </tr> <tr> <td> </td> <td> <div class="loginbutton" align="left"> <input type="button" value="login" id="126534747619913615753" onclick="addmessage('framework', 'object', [{name: 'identifier', type: 'string', value: '126534747619913615753'}, {name: 'method', type: 'string', value: 'invoke'}, {name: 'action', type: 'string', value: 'click'}]); sendmessagequeue();" /> </div>issue id , name attributes each change script work day nothing. there way around using getelementbyid or getelementsbytagname? below code have been trying
#does not work. $usernameid = $ie.document.getelementsbytagname("input") | where-object {$_.type -eq "password"}.value = $username #works if id's inputted correctly before change $ie.document.getelementbyid("11814975744662065521").value = $username $ie.document.getelementbyid(“173258662219278287302”).value = $password $ie.document.getelementbyid(“9636324655707186153”).click()
this done prevent doing this. server knows happening. designers of site not want automate.
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment