getTime()

From Hack Wars Wiki

Jump to: navigation, search


Information for free function getTime()
Function getTime()
API Attacking, Banking, FTP, Watch, HTTP, Challenges
Description Returns a formated string representing the current time.


Watch Script Example

The most common use for this function is for time-stamping your log entries:

string tarip = getTargetIP();
string msg = "("+getDate()+" "+getTime()+") You were scanned by "+tarip;
 
if(fileExists("YourLogFile.txt")==true){
   writeLine("YourLogFile.txt",msg);
}else{
   writeFile("YourLogFile.txt",msg);
}

If you placed the above code in a scan watch and someone scans you then a message similar to the following would be saved in your log text file:
"(27-Jan-2009 11:04:38 PM) You were scanned by 123.456.7.890".

Personal tools