79409448

Date: 2025-02-03 16:48:00
Score: 2
Natty:
Report link

I can not comment on ´N. Kaufman´ right away, because of my reputation, but I figured a way out to login using your browser auto-login system. It is just entering the username, then TAB to the password section to let your browser auto-fill the password while waiting 2 seconds for the auto-fill to then enter. In this case you also prevent others from stealing your password out of your file and the grandma do not need to bother loosing the file, because of your browsers cloud safe.

@if (@CodeSection == @Batch) @then


@echo off

rem Use %SendKeys% to send keys to the keyboard buffer
set SendKeys=CScript //nologo //E:JScript "%~F0"
START FIREFOX "URL"
rem the script only works if the application in question is the active window. Set a 
timer to wait for it to load!
timeout /t 10
rem use the tab key to move the cursor to the login and password inputs. Most htmls 
interact nicely with the tab key being pressed to access quick links.
rem %SendKeys% "{TAB}"
rem now you can have it send the actual username/password to input box
%SendKeys%  "{TAB}"
%SendKeys%  "{TAB}"
%SendKeys%  "USERNAME"
%SendKeys%  "{TAB}"
timeout /t 2
%SendKeys%  "{ENTER}"


goto :EOF

@end
// JScript section

var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));
Reasons:
  • RegEx Blacklisted phrase (1): can not comment
  • RegEx Blacklisted phrase (1.5): reputation
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: PAARTHURNAX