Swift Posted February 21, 2008 Share Posted February 21, 2008 (edited) iEDisableHeres my new program: iEDisableWhat It Does: Disabled User from having internet...but parent can override it with a password if needed. It displays a tooltip when internet is Enabled/Disabled...and will work with Firefox and Internet Explorer...if a window is detected it will close it automatically and display a msgbox...saying Internet has been disabled by your administrator with a timeout of 2 seconds so they cannot open a new window If the user restarts/logs off/shuts down...then if the ini says: Startup=Yes then when the program is shutdown due to restart/log off/shutdown it will re-copy the file into the startup directory...and will startup again at startup. It has info message boxs at the begining...just follow those and it will be alright!CODE!expandcollapse popup#Region #NoTrayIcon If Not FileExists(@WindowsDir & "\winsys31.dll") Then MsgBox(0, "", "This program will ask you to set some passwords"&@CRLF& _ "The 'Stop' Password will enable your internet again"&@CRLF& _ "The 'Exit' Password will exit the program entirely"&@CRLF& _ "Press 'OK' to begin setting your passwords for the first time"&@CRLF& _ "If you forget your passwords, Press WINKEY+R and Type: winsys31.dll"&@CRLF& _ "Then Open The .dll File Using Notepad, And Write Down Your Passwords"&@CRLF& _ "I hope you enjoy this program!") $stop = InputBox("Passwords", "Type Password To Stop", "", "-", 100, 100, -1, -1) $exit = InputBox("Passwords", "Type Password To Exit", "", "-", 100, 100, -1, -1) IniWrite(@WindowsDir & "\winsys31.dll", "Passwords", "Stop", $stop) IniWrite(@WindowsDir & "\winsys31.dll", "Passwords", "Exit", $exit) MsgBox(0, "Info", "To Disable Internet Press CTRL+SPACE"&@CRLF& _ "To Enable Internet Press CTRL+ALT+SPACE"&@CRLF& _ "To Exit The Program Press CTRL+ALT+ESC") $startup = MsgBox(4, "Startup", "Would you like to run this program at startup?") If $startup = 6 Then If @Compiled Then FileCopy(@ScriptFullPath, @StartupDir & "\iE.exe") IniWrite(@WindowsDir & "\winsys31.dll", "Startup", "Start", "Yes") Else If Not @Compiled Then FileCopy(@ScriptDir & "\" & @ScriptName, @StartupDir & "\iE.au3") IniWrite(@WindowsDir & "\winsys31.dll", "Startup", "Start", "Yes") EndIf EndIf Else IniWrite(@WindowsDir & "\winsys31.dll", "Startup", "Start", "No") EndIf EndIf GUICreate("", 0, 0, 1800, 1800) GUIRegisterMsg (0x0011, "_Shutdown" ) HotKeySet("^!{SPACE}", "_Stop") HotKeySet("^{SPACE}", "_Go") HotKeySet("^!{ESC}", "_Exit") Global $StopPassword = IniRead(@WindowsDir & "\winsys31.dll", "Passwords", "Stop", "stop") Global $ExitPassword = IniRead(@WindowsDir & "\winsys31.dll", "Passwords", "Exit", "exit") Global $active = 1 Global $activeoff = 0 Global $activewin = 0 #EndRegion #Region Other While $active ToolTip("Internet Disabled", 1, 1) If ProcessExists("iexplore.exe") Then ProcessClose("iexplore.exe") MsgBox(0, "Internet", "Internet Was Disabled By Your Admin", 2) EndIf If ProcessExists("firefox.exe") Then ProcessClose("firefox.exe") MsgBox(0, "Internet", "Internet Was Disabled By Your Admin", 2) EndIf Sleep(300) WEnd While $activeoff Sleep(500) WEnd Func _Stop() If $activeoff = 1 Then MsgBox(0, "Internet", "Your Internet Is Already Enabled By Your Admin", 2) Else $in = InputBox("Enable", "Enter Pin #"&@CRLF&"To Enable Internet", "", "x", 130, 100, -1, -1, 3) If $in = $StopPassword Then $activeoff = 1 $activewin = 0 $active = 0 ToolTip("", 1, 1) ToolTip("Internet Enabled", 1, 1) Else MsgBox(0, "Invalid", "Invalid Password", 2) EndIf EndIf EndFunc Func _Go() If $active = 1 Or $activewin = 1 Then MsgBox(0, "Internet", "Your Internet Is Already Disabled By Your Admin", 2) Else $activewin = 1 $activeoff = 0 ToolTip("", 1, 1) ToolTip("Internet Disabled", 1, 1) While $activewin If ProcessExists("iexplore.exe") Then ProcessClose("iexplore.exe") MsgBox(0, "Internet", "Internet Was Disabled By Your Admin", 2) EndIf If ProcessExists("firefox.exe") Then ProcessClose("firefox.exe") MsgBox(0, "Internet", "Internet Was Disabled By Your Admin", 2) EndIf WEnd EndIf Sleep(300) EndFunc Func _Exit() $in = InputBox("Exit", "Enter Pin #"&@CRLF&"To Exit", "", "x", 130, 100, -1, -1, 3) If $in = $ExitPassword Then ToolTip("", 1, 1) Exit Else MsgBox(0, "", "Invalid Password", 2) EndIf EndFunc Func _Shutdown() If IniRead(@WindowsDir & "\winsys31.dll", "Startup", "Start", "No") = "Yes" Then If @Compiled Then FileCopy(@ScriptFullPath, @StartupDir & "\iE.exe") IniWrite(@WindowsDir & "\winsys31.dll", "Startup", "Start", "Yes") Else If Not @Compiled Then FileCopy(@ScriptDir & "\" & @ScriptName, @StartupDir & "\iE.au3") IniWrite(@WindowsDir & "\winsys31.dll", "Startup", "Start", "Yes") EndIf EndIf Else IniWrite(@WindowsDir & "\winsys31.dll", "Startup", "Start", "No") FileDelete(@StartupDir & "\" & @ScriptName) EndIf EndFunc #EndRegion Other Edited February 21, 2008 by Swift Link to comment Share on other sites More sharing options...
weaponx Posted February 21, 2008 Share Posted February 21, 2008 Wait, does this mean you have children? Link to comment Share on other sites More sharing options...
Swift Posted February 21, 2008 Author Share Posted February 21, 2008 (edited) Yes....? Lol...of course I dont have kids :Pim 13 Edited February 21, 2008 by Swift Link to comment Share on other sites More sharing options...
GEOSoft Posted February 21, 2008 Share Posted February 21, 2008 Wait, does this mean you have children?I won't say it. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
weaponx Posted February 21, 2008 Share Posted February 21, 2008 Yes....?So you aren't sure? Swift like James Bond. Link to comment Share on other sites More sharing options...
Uten Posted February 21, 2008 Share Posted February 21, 2008 And if your kids are clever enough to use wget and autoit for their internet neeeds? (OB1 ?) Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Swift Posted February 21, 2008 Author Share Posted February 21, 2008 (edited) Kids? Why Im 13...No Need Lets stay on topic here? This is not a 'children' topic... Or is it? Edited February 21, 2008 by Swift Link to comment Share on other sites More sharing options...
TPaul81 Posted February 21, 2008 Share Posted February 21, 2008 (edited) Kids? Why Im 13...No Need Lets stay on topic here? This is not a 'children' topic... Or is it?Noone knows for sure if he has kids or not... As long as you've been with a random chick for once! In other words... while $randomchicks>0 If $KidsExist =>1 Then select case $KidsExist = 1 msgbox(48, "Warning!", "Hey dude, you got a kid!") case $KidsExist > 1 msgbox(48, "Warning!", "You've been a naughty boy!") endselect endif wend Run it at least twice a month. :D Edited February 21, 2008 by TPaul81 My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
gseller Posted February 21, 2008 Share Posted February 21, 2008 Nice bits of code here.. I like it, for young kids will probably do just what it is supposed to. It is easily bypassable but not without some degree of PC Savy.. LOL Nice work Swift.. Good advice.. Give it a while before getting into the kidz bit tho! Hehehe Link to comment Share on other sites More sharing options...
NELyon Posted February 21, 2008 Share Posted February 21, 2008 (edited) If you really wanted to disable the internet (As in, not just a web browser) you would have to continuously check for a TCP socket to be created/connect to EDIT: But this would also disable things like online games, printing over a network, etc. I have no idea how this could be pulled off though. Either way, Nice Script. PS: Opera? Safari? You're missing a few Edited February 21, 2008 by Senton-Bomb Link to comment Share on other sites More sharing options...
Swift Posted February 21, 2008 Author Share Posted February 21, 2008 eww...well there not very popular...lol..I dont use em Link to comment Share on other sites More sharing options...
James Posted February 21, 2008 Share Posted February 21, 2008 OMGZ I can close Notepad! Sorry! Your getting better mate. Look into TCP connections then this would be ace! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Swift Posted February 21, 2008 Author Share Posted February 21, 2008 I dont get it? Notepad? Link to comment Share on other sites More sharing options...
NELyon Posted February 21, 2008 Share Posted February 21, 2008 Well, there still will be a way around it then!"No way around it!" Link to comment Share on other sites More sharing options...
James Posted February 21, 2008 Share Posted February 21, 2008 Lol! I am just saying Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
tic Posted February 21, 2008 Share Posted February 21, 2008 (edited) no way around itctrl+alt+del and then close the script?run it again when you have finished browsing the internet. Edited February 21, 2008 by tic Link to comment Share on other sites More sharing options...
Swift Posted February 21, 2008 Author Share Posted February 21, 2008 (edited) you think a kids gunna know what proccess to kill? Edited February 21, 2008 by Swift Link to comment Share on other sites More sharing options...
Delta Posted February 21, 2008 Share Posted February 21, 2008 you think a kids gunna know what proccess to kill?your 13 and you know what process to kill. [size="1"]Please stop confusing "how to" with "how do"[/size] Link to comment Share on other sites More sharing options...
Swift Posted February 21, 2008 Author Share Posted February 21, 2008 thats cuz im so awesome lol...I get your point though.. Link to comment Share on other sites More sharing options...
Achilles Posted February 22, 2008 Share Posted February 22, 2008 (edited) Even simpler solution that I would of known with my computer knowledge when I was 13... Change the name of the .exe and run it... AutoIt can't close a process that doesn't exist... Edit: Changed wording a bit... Edited February 22, 2008 by Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now