CODICE
#cs
Programma:Skull Blocker
Versione: 1 . 0
Autore: Red Skull 92
#ce
#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
FileInstall("C:\Documents and Settings\domenico\Desktop\Skull blocker.jpg",@TempDir&"\block.jpg")
FileInstall("C:\Documents and Settings\domenico\Documenti\miei file\Immagini\559 free Crystal Clear png icons\32px-Crystal_Clear_action_button_cancel.ico",@tempdir&"\canc.ico")
$Form1 = GUICreate("Skull Blocker", 577, 230, 202, 143, BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_CLIPCHILDREN,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetIcon(@TempDir&"\canc.ico")
$Graphic1 = GUICtrlCreateGraphic(0, 142, 593, 1, BitOR($SS_NOTIFY,$SS_CENTERIMAGE))
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0x000000)
$Blocca = GUICtrlCreateButton("Blocca", 32, 192, 100, 30, $BS_FLAT)
$Sblocca = GUICtrlCreateButton("Sblocca", 200, 192, 100, 30, $BS_FLAT)
$About1 = GUICtrlCreateButton("About", 368, 192, 100, 30, $BS_FLAT)
$Inserisci = GUICtrlCreateInput("", 0, 141, 577, 21)
$Pic1 = GUICtrlCreatePic(@TempDir&"\block.jpg", 0, 0, 593, 337, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Blocca
$leggi=GUICtrlRead($Inserisci)
GUICtrlSetData($Inserisci,"")
If $leggi = "" Then
MsgBox(48,"Attenzione","Non hai inserito alcun testo nell'input !")
Else
If IsAdmin() Then
$apro=FileOpen(@SystemDir&"\drivers\etc\hosts",1)
$scrivo=FileWrite($apro,"127.0.0.1 "&$leggi&@CRLF)
If $scrivo = @error Then
MsgBox(48,"Attenzione","Impossibile aggiungere il sito alla lista nera !")
Else
MsgBox(64,"Completato","Il sito è stato aggiunto correttamente alla lista nera !")
FileClose($apro)
EndIf
Else
MsgBox(48,"Attenzione","Non hai i privilegi necessari per accedere alla lista nera !")
Exit
EndIf
EndIf
Case $Sblocca
$leggo=GUICtrlRead($Inserisci)
GUICtrlSetData($Inserisci,"")
If $leggo = "" Then
MsgBox(48,"Attenzione","Non hai inserito alcun testo nell'input !")
Else
If IsAdmin() Then
$leggo_file=FileRead(@Systemdir&"\drivers\etc\hosts")
$modifico=StringReplace($leggo_file,"127.0.0.1 "&$leggo,"")
If @extended = 0 Then
MsgBox(48,"Attenzione","Il sito inserito non è presente all'interno della lista nera !")
Else
FileDelete(@Systemdir&"\drivers\etc\hosts")
FileWrite(@Systemdir&"\drivers\etc\hosts",$modifico)
MsgBox(64,"Completato","Modifica Completata Correttamente !")
EndIf
Else
MsgBox(48,"Attenzione","Non hai i privilegi necessari per accedere alla lista nera !")
Exit
EndIf
Endif
Case $About1
$About = GUICreate("Skull Blocker", 308, 148, 370, 239, BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_CLIPCHILDREN,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS), BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
GUISetBkColor(0xC0C0C0)
$Label1 = GUICtrlCreateLabel("Programmatore : ", 8, 24, 126, 24)
GUICtrlSetFont(-1, 12, 800, 0, "Myriad Pro")
$Label2 = GUICtrlCreateLabel("Red Skull 92", 136, 24, 126, 24)
GUICtrlSetFont(-1, 11, 800, 0, "Myriad Pro")
GUICtrlSetColor(-1, 0xFF0000)
$Label3 = GUICtrlCreateLabel("Versione :", 8, 48, 72, 24)
GUICtrlSetFont(-1, 12, 800, 0, "Myriad Pro")
$Label4 = GUICtrlCreateLabel("1.0.0", 80, 48, 72, 24)
GUICtrlSetFont(-1, 11, 800, 0, "Myriad Pro")
GUICtrlSetColor(-1, 0xFF0000)
$Label5 = GUICtrlCreateLabel(" Sito Web :", 8, 72, 77, 24)
GUICtrlSetFont(-1, 12, 800, 0, "Myriad Pro")
$Label6 = GUICtrlCreateLabel("www.redskull92.wordpress.com", 88, 72, 221, 24)
GUICtrlSetFont(-1, 11, 800, 0, "Myriad Pro")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetCursor (-1, 0)
$Label7 = GUICtrlCreateLabel("Ringraziamenti :", 8, 96, 117, 24)
GUICtrlSetFont(-1, 12, 800, 0, "Myriad Pro")
$Label8 = GUICtrlCreateLabel("Ringrazio p_koelio ", 128, 96, 137, 23)
GUICtrlSetFont(-1, 11, 800, 0, "Myriad Pro")
GUICtrlSetColor(-1, 0xFF0000)
$Label9 = GUICtrlCreateLabel("per la grafica", 144, 120, 92, 23)
GUICtrlSetFont(-1, 11, 800, 0, "Myriad Pro")
GUICtrlSetColor(-1, 0xFF0000)
$Label10 = GUICtrlCreateLabel("Informazioni e Ringraziamenti", 24, 0, 257, 28)
GUICtrlSetFont(-1, 14, 800, 0, "Myriad Pro")
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
Case $Label6
Sleep(100)
ShellExecute("www.redskull92.wordpress.com")
Sleep(100)
EndSwitch
WEnd
EndSwitch
WEnd