#include #include HotKeySet("{F1}","restriction_stop") HotKeySet("{F10}","restriction_totale") ;HotKeySet("{F2}","restriction_scan") Opt("WinTitleMatchMode", 2) Opt("TrayIconDebug", 1) #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.12.0 Author: Malossane Timothée Script Version : 0.1 Script Function: Interdiction d'aller voir des sites Internet... #ce ---------------------------------------------------------------------------- ;/////////////////////////////////////////////////////////////////////////// ;Definition des variables ;/////////////////////////////////////////////////////////////////////////// FileOpen( "historique.txt",9) $log ="historique.txt" Global $s, $nok = 0 Global Const $lciWM_SYSCommand = 274 Global Const $lciSC_MonitorPower = 61808 Global Const $lciPower_Off = 2 Global Const $lciPower_On = -1 Global $MonitorIsOff = False $controle_internet_actif = 1 $restriction_totale = 0 $controle_internet_historique = 1 $site_en_cours = "L'Auteur de ce script est un Dieu" ;/////////////////////////////////////////////////////////////////////////// ; Script Start - Add your code below here ;/////////////////////////////////////////////////////////////////////////// While 1 If $restriction_totale = 1 then restriction_totale() EndIf ;Si utilisation de Firefox If ProcessExists("firefox.exe") and $controle_internet_actif = 1 then $list = WinList("- Mozilla Firefox") If $list[0][0] <> 0 Then For $s = 1 to $list[0][0] $nok = 0 If StringInStr($list[$s][0],"cul") Then $nok = 1 EndIf If StringInStr($list[$s][0],"sexe") Then $nok = 1 EndIf If StringInStr($list[$s][0],"sexy") Then $nok = 1 EndIf If StringInStr($list[$s][0],"cochonne") Then $nok = 1 EndIf If StringInStr($list[$s][0],"pute") Then $nok = 1 EndIf If StringInStr($list[$s][0],"salope") Then $nok = 1 EndIf If StringInStr($list[$s][0],"bite") Then $nok = 1 EndIf If StringInStr($list[$s][0],"belle femme") Then $nok = 1 EndIf If StringInStr($list[$s][0],"nichon") Then $nok = 1 EndIf If StringInStr($list[$s][0],"seins") Then $nok = 1 EndIf If StringInStr($list[$s][0],"pipe") Then $nok = 1 EndIf If StringInStr($list[$s][0],"sucer") Then $nok = 1 EndIf If StringInStr($list[$s][0],"enculer") Then $nok = 1 EndIf If StringInStr($list[$s][0],"sodomie") Then $nok = 1 EndIf If $nok = 1 Then;Si site interdit, on passe a la reaction (Action ----->>> Reation ^^) MsgBox(0,$list[$s][0],"Site Web Interdit") $t = TimerInit() WinKill($list[$s][0]); On ferme While WinExists($list[$s][0]); on vérifie si le programme est bien fermé. Sleep(100) If TimerDiff($t) >= 5000 then ProcessClose("firefox.exe");methode forte si le tps depasse les 5 sec WEnd EndIf If $controle_internet_historique = 1 then If $site_en_cours <> $list[$s][0] then _FileWriteLog($log,$list[$s][0]) $site_en_cours = $list[$s][0] EndIf EndIf Next EndIf Sleep(120) EndIf ;Si utilisation d'Internet Explorer (on sait jamais , ya toujours des glandus lol ) If ProcessExists("iexplore.exe") and $controle_internet_actif = 1 then $list = WinList(" - Windows Internet Explorer") If $list[0][0] <> 0 Then For $s = 1 to $list[0][0] $nok = 0 If StringInStr($list[$s][0],"cul") Then $nok = 1 EndIf If StringInStr($list[$s][0],"sexe") Then $nok = 1 EndIf If StringInStr($list[$s][0],"sexy") Then $nok = 1 EndIf If StringInStr($list[$s][0],"cochonne") Then $nok = 1 EndIf If StringInStr($list[$s][0],"pute") Then $nok = 1 EndIf If StringInStr($list[$s][0],"salope") Then $nok = 1 EndIf If StringInStr($list[$s][0],"bite") Then $nok = 1 EndIf If StringInStr($list[$s][0],"belle femme") Then $nok = 1 EndIf If StringInStr($list[$s][0],"nichon") Then $nok = 1 EndIf If StringInStr($list[$s][0],"seins") Then $nok = 1 EndIf If StringInStr($list[$s][0],"pipe") Then $nok = 1 EndIf If StringInStr($list[$s][0],"sucer") Then $nok = 1 EndIf If StringInStr($list[$s][0],"enculer") Then $nok = 1 EndIf If StringInStr($list[$s][0],"sodomie") Then $nok = 1 EndIf If $nok = 1 Then;Si site interdit, on passe a la reaction (Action ----->>> Reation ^^) $t = TimerInit() WinKill($list[$s][0]); On ferme While WinExists($list[$s][0]); on vérifie si le programme est bien fermé. Sleep(100) If TimerDiff($t) >= 5000 then ProcessClose("iexplore.exe");methode forte si le tps depasse les 5 sec WEnd MsgBox(0,$list[$s][0],"Site Web Interdit") EndIf If $controle_internet_historique = 1 then _FileWriteLog($log,$list[$s][0]) Next EndIf Sleep(120) EndIf ; Si ni Firefox ni Internet Explorer n'est ouvert, on dort ... Sleep(500) WEnd Func restriction_totale() _MouseTrap(0,0,1,1) $MonitorIsOff = True Local $Progman_hwnd = WinGetHandle('[CLASS:Progman]') While $MonitorIsOff = True DllCall('user32.dll', 'int', 'SendMessage', _ 'hwnd', $Progman_hwnd, _ 'int', $lciWM_SYSCommand, _ 'int', $lciSC_MonitorPower, _ 'int', $lciPower_Off) _IdleWaitCommit(0) Sleep(20) WEnd EndFunc Func restriction_stop() $MonitorIsOff = False Local $Progman_hwnd = WinGetHandle('[CLASS:Progman]') DllCall('user32.dll', 'int', 'SendMessage', _ 'hwnd', $Progman_hwnd, _ 'int', $lciWM_SYSCommand, _ 'int', $lciSC_MonitorPower, _ 'int', $lciPower_On) _MouseTrap() EndFunc Func restriction_scan() ;~ Opt("WinDetectHiddenText", 1) ;~ Opt("WinTitleMatchMode", 2) ;~ $texte = WinGetText(" - Mozilla Firefox") ;~ msgbox(0,"",$texte) ;~ $nok = 0 ;~ If StringInStr($texte,"cul") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"sexe") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"sexy") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"cochonne") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"pute") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"salope") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"bite") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"belle femme") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"nichon") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"seins") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"pipe") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"orgasme") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"enculer") Then ;~ $nok = 1 ;~ EndIf ;~ If StringInStr($texte,"sodomie") Then ;~ $nok = 1 ;~ EndIf ;~ If $nok = 1 Then;Si site interdit, on passe a la reaction (Action ----->>> Reation ^^) ;~ ;~ $t = TimerInit() ;~ WinKill($list[$s][0]); On ferme ;~ While WinExists($list[$s][0]); on vérifie si le programme est bien fermé. ;~ Sleep(100) ;~ If TimerDiff($t) >= 5000 then ProcessClose("iexplore.exe");methode forte si le tps depasse les 5 sec ;~ WEnd ;~ MsgBox(0,$list[$s][0],"Site Web Interdit après analyse de la page en cours de lecture...") ;~ EndIf EndFunc Func _IdleWaitCommit($idlesec) Local $iSave, $LastInputInfo = DllStructCreate ("uint;dword") DllStructSetData ($LastInputInfo, 1, DllStructGetSize ($LastInputInfo)) DllCall ("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr ($LastInputInfo)) Do $iSave = DllStructGetData ($LastInputInfo, 2) Sleep(60) DllCall ("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr ($LastInputInfo)) Until (DllStructGetData ($LastInputInfo, 2)-$iSave) > $idlesec Or $MonitorIsOff = False Return DllStructGetData ($LastInputInfo, 2)-$iSave EndFunc