Advertisement
waliedassar

VBoxSharedFolderFS

Oct 18th, 2012
1,403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.71 KB | None | 0 0
  1. //http://waleedassar.blogspot.com (@waleedassar)
  2. //If you happen to have a mapped shared folder inside VirtualBox, then it always has the File system named "VBoxSharedFolderFS".
  3. #include "stdafx.h"
  4. #include "windows.h"
  5. #include "stdio.h"
  6.  
  7. int main(int argc, char* argv[])
  8. {
  9.     for(unsigned char x='A';x<='Z';x++)
  10.     {
  11.         char drv[0x4]={0};
  12.         drv[0]=x;
  13.         drv[1]=':';
  14.         drv[2]='\\';
  15.         if(DRIVE_REMOTE==GetDriveType(drv))
  16.         {
  17.             char FSName[0x110]={0};
  18.             if(GetVolumeInformation(drv,0,0,0,0,0,FSName,0x100))
  19.             {
  20.                 if(strcmpi("VBoxSharedFolderFS",FSName)==0)
  21.                 {
  22.                     MessageBox(0,"VirtualBox detected","walied",0);
  23.                 }
  24.                 else
  25.                 {
  26.                     printf("%s %s\r\n",drv,FSName);
  27.                 }
  28.             }
  29.         }
  30.     }
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement