Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 18-11-2009
Member
 
Join Date: Jan 2009
Posts: 65
Needs Removable Disk Checker source code

Hi friends, I want to know how can we create program which will check the removable disk. Is this code will be smaller or bigger? Can anyone post on this forum if have? I want to just check how it can be developed? If anyone have just provide it. I am waiting for your reply.
Reply With Quote
  #2  
Old 18-11-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: Needs Removable Disk Checker source code

I don't think that will be as much easy. You need to know detail programming, then only it will be possible to you. You just need to ask this question who is working in the field of software development with more experience. I don't think this would be possible to the person who are ordinary as me and you. Just try search on the google, I think there would you get something regarding this, either source code directly or you will get some material about it. Just check it.
Reply With Quote
  #3  
Old 18-11-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: Needs Removable Disk Checker source code

Hi you are searching for the souce code as Removable Disk Checker. I have one which is in C++. Just try to run it and see how it works.

Code:
#include<iostream>
#include<string.h>
#include<fstream>
#include<conio.h>

using namespace std;

int i, a, b;
char letter[2], nameOfExe[15], str[20], del[30]="\"del ", autorun[20]="\"", attrib[40]="\"attrib ", c[600], temp[81];
char choice;

bool getExeName()
{
ifstream file;
file.open(str);

file.getline(temp, 80);
file.getline(temp, 80);


string str=temp;
string nameofexe;

size_t pos;
pos = str.find("="); // position of "=" in str
nameofexe = str.substr(pos+1); // get from "=" to the end

strcpy(nameOfExe, nameofexe.c_str());

cout<<"\nThe name of the file to be deleted is "<<nameOfExe<<endl;

return true;
}
void showInfo()
{
cout<<"\n\n\nThe autorun.inf in your drive seems to execute an exe.\n";
cout<<"This exe, most probably is a virus script. We recommend that you\n";
cout<<"delete the file manually, using Command Prompt or run a good \n";
cout<<"anti-virus software to do the job. As an alternative to using\n";
cout<<"Command Prompt, you can also use this program to delete the exe.\n";
}
void showWarningMessage()
{
cout<<"\n\nPlease run an anti-virus utility before you open \nyour removable drive.";
}
void thanks()
{
cout<<"\n\nThanks for using this toool!\n\n\n";
}
void overwriteAutorun()
{
system("echo off");

strcpy(attrib, "\"attrib ");

strcat(attrib, letter);
strcat(attrib, ":\\");
strcat(attrib, "autorun.inf");
strcat(attrib, " -r -s -h\"");

system(attrib);

strcpy(del, "\"del ");

strcat(del, letter);
strcat(del, ":\\");
strcat(del, "autorun.inf");

remove(del);

}
void overwriteExe()
{
system("echo off");

strcpy(attrib, "\"attrib ");

strcat(attrib, letter);
strcat(attrib, ":\\");
strcat(attrib, nameOfExe);
strcat(attrib, " -r -s -h\"");

system(attrib);

strcpy(del, "\"del ");

strcat(del, letter);
strcat(del, ":\\");
strcat(del, nameOfExe);

system(del);

}
void theDeleteFunction()
{
char opt;
cout<<"Are you sure you want to delete this exe? "<<endl;
cout<<nameOfExe;
cout<<endl;
cout<<"Y/N? ";
cin>>opt;
if(opt=='y'||opt=='Y')
{
overwriteExe();

overwriteAutorun();

cout<<endl<<endl<<nameOfExe<<" was successfully deleted from drive!";
thanks();

system("Pause");
exit(0);
}
else
{
showWarningMessage();
thanks();

system("Pause");
exit(0);
}
}
void inputExeNameFromUser()
{
cout<<"We couldn't find the name of the exe. \n";
cout<<"Please enter enter the name of the exe \n";
cout<<"to be deleted from the information shown below\n\n\n";
cout<<c;
cout<<"\n\n\nEnter the name of the Exe: ";
gets(nameOfExe);
}

int main()
{
ifstream file;
cout<<"Enter drive letter: ";
cin>>letter;
strcat(str, letter);
strcat(str, ":\\autorun.inf");
/**/cout<<endl<<endl<<str<<endl<<endl;
file.open(str);
if(file.is_open() == true)
{
cout<<endl<<endl<<"These are the contents of your autorun.inf file. It's usually\nused to execute virus scripts"<<endl<<endl;
i=0;
while(file.good())
{
c[i]=file.get();
i++;
}
file.close();
cout<<c;

showInfo();
cout<<endl<<endl<<endl<<"Do you want to remove the exe that could be vulnerable using this program? ";
cin>>choice;

if(choice=='y'||choice=='Y')
{
if(getExeName()==true)
theDeleteFunction();
else
{
inputExeNameFromUser();
theDeleteFunction();
}
}
else
{
showWarningMessage();
thanks();

system("Pause");
exit(0);
}


}
else
{
cout<<endl<<endl<<"Your drive is not infected!!"<<endl;
thanks();
}
file.close();
cout<<endl<<endl;
system("pause");
}
Search on net you will get more source code.

Last edited by MindSpace : 18-11-2009 at 08:59 AM.
Reply With Quote
  #4  
Old 18-11-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: Needs Removable Disk Checker source code

Hi, I don't think that it is possible for me, But I have some friends which can do it for you. But you don't provide the source code language. In which language you require this. If you want in specific language then it will take more time as I don't know it will be known to friend or not. If you just want source code then I will give you within two days interval. Let us check whether My friends able to do it or not. If possible then I will provide you it.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Needs Removable Disk Checker source code"
Thread Thread Starter Forum Replies Last Post
removable disk disappeared from my computer shilpa Hardware Peripherals 3 29-08-2009 07:11 PM
Can i use my Internal Hard Disk as a Removable Mass Storage Device? RPVG Hardware Peripherals 4 01-03-2009 11:46 PM
removable disk Bhuvan Hardware Peripherals 2 08-12-2008 02:00 PM
Securing access to a removable disk Abedin Tips & Tweaks 1 14-11-2008 06:48 PM
Errors while copying files to a removable disk blindsleeper Hardware Peripherals 2 18-10-2008 02:24 PM


All times are GMT +5.5. The time now is 01:42 AM.