Hello,
This is my anti ransomware program.
which does a good job.
This program monitors the data folder.
Only dbf, ftp and cdx files are allowed in the data folder. If a ransomware tries to encrypt a file, the bat-file is called with the shutdown command.
Similar to this I will make the new program.
If a new user is added the system sends a warning od shutdown.
Also if new files in user folder are added.
Best regards
Otto
- Code: Select all Expand view
#include "FiveWin.ch"
static oWnd, oTimer
//----------------------------------------------------------------------------//
function Main()
DEFINE DIALOG oWnd FROM 3, 3 TO 20, 50 ;
TITLE OemToAnsi( "Testing timers" )
ACTIVATE DIALOG oWnd ;
ON INIT StartTimer()
return nil
//----------------------------------------------------------------------------//
function StartTimer()
DEFINE TIMER oTimer OF oWnd ;
INTERVAL 300 ;
ACTION ( check() )
ACTIVATE TIMER oTimer
return nil
//----------------------------------------------------------------------------//
function check()
local aDir := directory( "x:\xwhdaten\DATAWIN\" + "*.*","DHS")
local I := 1
local cFilename := ""
local lFehler := .f.
local cFehler := ""
oTimer:Deactivate()
FOR I := 1 to len( aDir )
lFehler := .T.
if aDir[ I , 1 ] <> "."
if ALLTRIM ( UPPER( cFileExt( aDir[ I , 1 ] ) ) ) = "DBF"
lFehler := .f.
endif
if UPPER( cFileExt( aDir[ I , 1 ] ) ) = "FPT"
lFehler := .f.
endif
if UPPER( cFileExt( aDir[ I , 1 ] ) ) = "CDX"
lFehler := .f.
endif
if lFehler = .t.
cFehler += aDir [ I, 1 ] + CRLF
FWLOG cFehler
winexec( "abmelden.bat" )
endif
endif
next
oTimer:activate()
return nil
*******************
abmelden.bat
shutdown -S
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club********************************************************************