Jump to content

USB Rubber Ducky Drive Letter?


Recommended Posts

Right, so first off, I've been writing scripts for the rubber ducky to deliver a program that will be stored on the USB. There have been other threads about this but I think that was in relation to another issue. 

My issue is that I need a (preferrably simple) script that would use CMD to find the Drive Letter for the Rubber Ducky and copy it to the clipboard.

For instance, the beginning of my script begins with waiting 15 seconds on the off chance that auto opens, from which I can copy the address bar to get the Drive Letter.

Honestly i've spent days trying to figure this out (sorry I'm quite new to coding) any help would be appreciated.

 

Link to comment
Share on other sites

for /f %d in ('wmic volume get driveletter^, label^|findstr "DUCKY"') do @set duck=%d

This cmd line will save the ducky drive letter to the varibale "duck" (your drive should be labeled DUCKY). Dont know about the clipboard part though...

Edited by ThoughtfulDev
Link to comment
Share on other sites

On 4/11/2017 at 9:28 PM, ThoughtfulDev said:

for /f %d in ('wmic volume get driveletter^, label^|findstr "DUCKY"') do @set duck=%d

This cmd line will save the ducky drive letter to the varibale "duck" (your drive should be labeled DUCKY). Dont know about the clipboard part though...

Thanks man! I appreciate the help, I was getting really lost at first but this is giving me a lot of direction, cheers!

Link to comment
Share on other sites

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...