Saved Bookmarks
| 1. |
Solve : Usb Security? |
|
Answer» Right now try to make usb security software like my pendrive vol is "Volume Serial Number is 2404-3726" if the vol no. "2404-3726" match then it open other wise it can't open so no one can load virus in my system it is possible in DOS or any other language pls help me. What? Do you have any code already? I'm not sure how to dismount the flashdrive and only re-mount it when the correct password is entered. This is my "code": Pseudo dismount %~d Set /P volinp=Volume Number: If "%volinp%"=="volume number here" pseudo mount %~d No no not like this we not enter the number like passwords but it match internali if vol no. match then it open other wise eject. or possible in other langage pls help ...So your saying something like this pseudo-code? On USB.INSERT If USB.VOLUME EQU VOLUMENUMBR THEN (exit) ELSE (USB.EJECT=true) yes3 words. Not in BATCH. So in which language is this 3 word is haveQuote from: Deadly D on September 08, 2009, 09:38:04 PM http://www.cprogramming.com/smeezekitty- offer a demonstration.ok then Code: [Select]#include <iostream.h> //some COMPILERS use iostream some iostream.h #include <Stdio.h> #include <stdlib.h> #include <string.h> #define _S "<proper serril number here>" int main(){ int i; char line[60]; char ser[30]; system ("dir X:\*.pes >_temp.tmp"); //change X to the proper drive letter FILE *f = fopen("_temp.tmp", "r"); fgets(line, 0xFFF, f); fgets(line, 0xFFF, f); //fgets(line, 0xFFF, f) //NEEDED? while(line[25+i]){ser[i]=line[25+i]; i++;} //change 25 to the OFFSET of the seril number (25 should be ok) ser[i]=0; fclose(f); system("del _temp.tmp"); cout<<"Number of volume:" <<ser <<endl; if(strncmp(ser, _S, strlen(_S)) == 0){cout<<"OK!\n";} else {/*eject code here*/} return 0; } Thanks for replay @[emailprotected] but can possible to find serial no of pen drive and match.maybe BC_programmer (my buddy i argue with) can help |
|