Batch file gurus

Locked
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Batch file gurus

Post by +JuggerNaut+ »

need some help. i'm looking to create a .bat file that will input characters within any given field that the cursor resides. for example, in the username field of a webpage.

any help or pointers appreciated.
User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Post by Foo »

use windows script hoste to write the value to the clipboard and then use it again to paste to the active element
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

WSH is disabled for security reasons, so can't go that route. thanks for the suggestion though.
User avatar
FragaGeddon
Posts: 3229
Joined: Sun Sep 17, 2000 7:00 am

Post by FragaGeddon »

Just use keepass. A couple clicks and your done.
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

sorry, i should have stated that third party software cannot be used.
User avatar
FragaGeddon
Posts: 3229
Joined: Sun Sep 17, 2000 7:00 am

Post by FragaGeddon »

Well you can run keepass from a thumb drive. No need to install it. You might have to install it on another computer first. Then just copy the files over.
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

FragaGeddon wrote:Well you can run keepass from a thumb drive. No need to install it. You might have to install it on another computer first. Then just copy the files over.
sorry, these devices use encryption keys per user, per device, so unauthorized drives will not work (users don't get thumb drives because there is no business need in this environment), but thanks again for the suggestion.
Tormentius
Posts: 4108
Joined: Sat Dec 14, 2002 8:00 am

Post by Tormentius »

The only way I know of is through WSH. AFAIK what you're looking for isn't possible with a simple batch file.
4days
Posts: 5465
Joined: Tue Apr 16, 2002 7:00 am

Post by 4days »

assuming that it's for entering something on a particular webpage - does the form on the webpage only accept requests from POST or could you build a url and push the request through on GET?

what's the scope for bending the 3rd party rule - e.g. if you can create a batch file on the machine, what else can you do?
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

Tormentius wrote:The only way I know of is through WSH. AFAIK what you're looking for isn't possible with a simple batch file.
yeah, kinda what i figured, but thought i'd give it a shot.
4days wrote:assuming that it's for entering something on a particular webpage - does the form on the webpage only accept requests from POST or could you build a url and push the request through on GET?
a webpage was just an example, but i'm not familiar enough with HTML to get very far with that idea.
4days wrote:
what's the scope for bending the 3rd party rule - e.g. if you can create a batch file on the machine, what else can you do?
actually you can't create it on the tablets themselves, but they can grab it from a network folder with no problem.
4days
Posts: 5465
Joined: Tue Apr 16, 2002 7:00 am

Post by 4days »

+JuggerNaut+ wrote:actually you can't create it on the tablets themselves, but they can grab it from a network folder with no problem.
but they can't run an exe across the network? would they trust an MSI? you could make one that doesn't actually install anything but runs a custom action to call an external/embedded program. the embedded program being this app with the ability to input data.

without a much better idea of what it actually needs to do, it's hard/pointless to say - even if you had the freedom to install software on the tablet.
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

4days wrote:
+JuggerNaut+ wrote:actually you can't create it on the tablets themselves, but they can grab it from a network folder with no problem.
but they can't run an exe across the network? would they trust an MSI? you could make one that doesn't actually install anything but runs a custom action to call an external/embedded program. the embedded program being this app with the ability to input data.

without a much better idea of what it actually needs to do, it's hard/pointless to say - even if you had the freedom to install software on the tablet.
it's sounding like much more trouble than it's worth rather than the lazy bastards just hammering it out on the V/keyboard or copying/pasting. i'm thinking i'm gonna lay this one to rest.

i appreciate all the responses guys, thanks.
dzjepp
Posts: 12839
Joined: Wed Mar 28, 2001 8:00 am

Post by dzjepp »

Can't you use something like autohotkey? You can make an exe with that which won't require users to have autohotkey installed. http://www.autohotkey.com/

Although I probably missed the entire point of discussion as I mostly skimmed it, and for that I appologize. :ninja:
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

If it's an internal website that you have access to, you could wrap it in an IFRAME and use some black JavaScript magic to fill in the fields, like this:

Code: Select all

window.frame['frameName'].document.forms['formName']['inputField'].value = 'Yet Another JavaScript Hacker';
Tormentius
Posts: 4108
Joined: Sat Dec 14, 2002 8:00 am

Post by Tormentius »

^misantropia^ wrote:If it's an internal website that you have access to, you could wrap it in an IFRAME and use some black JavaScript magic to fill in the fields, like this:

Code: Select all

window.frame['frameName'].document.forms['formName']['inputField'].value = 'Yet Another JavaScript Hacker';
And if that site is listed via Group Policy as a trusted site the security in IE would probably let it work. Might be worth a shot.
bitWISE
Posts: 10704
Joined: Wed Dec 08, 1999 8:00 am

Post by bitWISE »

Why require a login/password if you want to bypass it? Restrict the website to a specific range of IPs and remove the login screen.
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

^misantropia^ wrote:If it's an internal website that you have access to, you could wrap it in an IFRAME and use some black JavaScript magic to fill in the fields, like this:

Code: Select all

window.frame['frameName'].document.forms['formName']['inputField'].value = 'Yet Another JavaScript Hacker';
i'll see if we can implement this, thanks.
bitWISE wrote:Why require a login/password if you want to bypass it? Restrict the website to a specific range of IPs and remove the login screen.
who's bypassing passwords? this is only for the login.
Locked