the download link is disabled as it has an unknown binary file in the RAR file.
If you describe what you need to do, with the text pasted into the post, then you will get some assistance.
Hello and thank you for taking a look at my thread.
I have a project however im kinda stuck, a little help would be nice
My project is a anti virus in batch that can detect and remove viruses, i know this is not really possible in batch so i have some c++ in the mix.
Please download my project so you can work with it and understand it!
https://mega.co.nz/#!ws8XHQyT!2N9K85c2I ... 6jXIBYeFQQ
The problem in facing is this:
I have a database.txt, it contains md5 hashes of real viruses, those that need to be removed. here is how it looks right now
Note: these are test subjects, the real database has over 10,000 lines in it.
if you downloaded the files above, please put it in the C: folder, this is required atm for the c++ program to work. Now open the bat file, it will then scan the computer, right? After that you will get a scannedfiles.txt, it contains all the files on your own computer. Now we need to compare the 2 text files and see if any lines in the database.txt match the scannedfiles.txt. then we need to auto delete the files.
I have tried and tried, i cant code it with my knowledge, here is some codes i have tried:
Code: Select all
@echo off
for /F "tokens=*" %%a in ('findstr /G:database.txt scannedfiles.txt') do del "%%a"
Code: Select all
FOR /F "tokens=* delims= " %%a in ('database.txt') do (set database=%%a)
FOR /F "tokens=* delims= " %%z in ('type scannedfiles.txt ^| findstr %%a')
Any help would be very nice!
MOD EDIT: This is the batch script inside the RAR file FWIW
Code: Select all
@echo off
title Flarus Beta 0.0.8
echo You need to run the following program in admin mode, or this will not work.
timeout /t 2 /nobreak>nul
cls
:Menu1
echo 1. Scan mode.
echo 2. Scan and auto delete mode.
echo 3. Scan and manual delete mode.
echo 4. Debug mode.
echo 5. Update Database.
choice /c 12345>nul
if "%errorlevel%"=="1" call :Scanmode
if "%errorlevel%"=="2" call :Scanautodelete
if "%errorlevel%"=="3" call :scanmanualdelete
if "%errorlevel%"=="4" call :Debugmode
if "%errorlevel%"=="5" call :Update
goto eof
:Scanmode
cls
cd C:\Antivirus
fciv -md5 -add C: -r -type *.exe -type *.dll -type *.bat>scannedfiles.txt
del fciv.err
:Scanautodelete
cls
cd C:\Antivirus
fciv -md5 -add C: -r -type *.exe -type *.dll -type *.bat>scannedfiles.txt
del fciv.err
:scanmanualdelete
cls
cd C:\Antivirus
fciv -md5 -add C: -r -type *.exe -type *.dll -type *.bat>scannedfiles.txt
del fciv.err
:Debugmode
cls
cd C:\Antivirus
fciv -md5 -add C: -r -type *.exe -type *.dll -type *.bat>scannedfiles.txt
:Update
cls
bitsadmin.exe /transfer "Flarus Update" http://goo.gl/MIPYFu C:\Antivirus\Database.txt
pause