Jump to content

Archived

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

Darren Kitchen

[Payload] Duck Slurp v2 (Silent)

Recommended Posts

Sorry if I'm posting this in the wrong spot. But I have a question about the duckywait bat file.

It does a good job of detecting drive insertion. I have been toying around with trying to reverse the logic to detect drive removal. This would be nice to have to have a few safety net files handy to run in case the process get interrupted and you have to jerk the drive out quick like. Copy some cleanup routines to temp, trigger them when the drive is removed.. as you race neo like through the building dodging mr smith.

It acts as though diskpart is not updating the status of the attached drives. The routine will repeat, drive still attached. I have even ran the command to list volumes in diskpart while the bat file is running and it shows no DUCKY! Yet the script still fails to recognize drive removal. I have tried some variations to no avail so I'll post what seems like it should work.

Here is what I have.

EDIT Got it to work using SETLOCAL and ENDLOCAL see the RED highlights.

@echo off
setlocal
:while1
for /f "tokens=3 delims= " %%A in ('echo list volume ^| diskpart ^| findstr "DUCKY"') do (set DUCKYdrive=%%A:)
if [%DUCKYdrive%] EQU [] (
echo waiting on jump drive...
timeout /t 3
goto :while1
) else (
echo Jump Drive Found !
pause
endlocal
goto :impatient
)
:impatient
setlocal
for /f "tokens=3 delims= " %%A in ('echo list volume ^| diskpart ^| findstr "DUCKY"') do (set DUCKYdrive=%%A:)
if [%DUCKYdrive%] EQU [] (
echo Jump Drive Removed !
timeout /t 20
goto :end
) else (
echo Jump Drive Still in...
timeout /t 3
endlocal
goto :impatient
)
:end
echo goodbye
exit

Share this post


Link to post
Share on other sites

Hi all,

This scripts sounds great, I am waiting for the Duckys to be back in stock. But the .bat script works fine.

Sadly, when I run it, it only copies the files in the main directory of Documents. It will not copy any folders, or any files in sub-folders.

Is it possible to copy all the folders located in documents too?

Thanks in advance. :)

- PXgamer

Share this post


Link to post
Share on other sites

Hi,

I've got a suggestion for the DuckSlurp batch file. instead of using xcopy you could also use robocopy.

robocopy /B

This parameter sets robocopy in backup-mode, thus bypassing any ACL rules.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...