Is this a false positive for the Firkin-gen worm? The batch file contains no non-printable characters. It creates a temporary batch file. I used it on my work computer with out problems. NAV did not flag it then. I also attached it to my Yahoo e-mail and NAV did not pick it up there. Is this batch file safe? Text of the batch file is below and is attached.
Many thanks in advance.
– Ken
@echo off
rem
rem Put string “Current time is hh:mm:ss.ssp” in a file called “cu##ent.bat”
rem
echo.|time|find “Current” >cu##ent.bat
rem
rem Put the string “set time=%3” in a file called “current.bat”
rem
echo set time=%%3> current.bat
rem
rem Execute the first batch file in which the first word is the name of the second batch
rem file and whose third word is the time. This calls the batch file CURRENT.BAT which takes
rem it’s third argument – the time – and sets it to an environment variable called “time”.
rem
call cu##ent.bat
rem
rem At this point the time is in the environment but has colons and periods in it. Both are
rem bad news. They will be replaced by harmless dashes. CU##ENT.BAT and CURRENT.BAT are no
rem longer needed and will be overwritten below
rem
rem build a batch file that replaces the existing CURRENT.BAT.
rem misuse of the choice command puts the following string in the file “current.bat”:
rem Note that commas can separate arguments to a file just as spaces can.
rem cu##ent.bat [=,h,h,:,m,m,:,s,s,.,s,s,p,=]?=
rem
echo = | choice /c=%time%= cu##ent.bat > current.bat
rem echo = | choice /c=%time%= cu##ent.bat | set time
rem
rem build a batch that replaces the existing cu##ent.bat
rem
rem Set echo off
echo @echo off > cu##ent.bat
rem Clear environment variable, not needed
echo set time= >> cu##ent.bat
rem Start top of loop
echo :LOOP >> cu##ent.bat
rem make second arg first and so on
echo shift >> cu##ent.bat
rem if you are at the end of the string created by the choice command, exit the loop
echo if “%%1”==“]?” goto DONE >> cu##ent.bat
rem if the argument is a colon or a period then concatenate the existing time variable with
rem a dash
echo if “%%1”==“:” goto REPLACE >> cu##ent.bat
echo if “%%1”==“.” goto REPLACE >> cu##ent.bat
rem otherwise concatenate the existing time variable with the next argument
echo goto KEEP >> cu##ent.bat
rem labelled sections
echo :REPLACE >> cu##ent.bat
echo set time=%%time%%- >> cu##ent.bat
echo goto LOOP >> cu##ent.bat
echo :KEEP >> cu##ent.bat
echo set time=%%time%%%%1 >> cu##ent.bat
echo goto LOOP >> cu##ent.bat
rem end of loop
echo :DONE >> cu##ent.bat
rem
rem Call the CURRENT.BAT file which calls the CU##ENT.BAT file
rem
call current.bat
rem
rem Remove the CURRENT.BAT and the CU##ENT.BAT files.
rem
rem del cu??ent.bat > nul