mafioso Posted May 27, 2008 Share Posted May 27, 2008 expandcollapse popup#include <File.au3> #NoTrayIcon Opt("WinTitleMatchMode", 1) WinWait("Microsoft Internet Explorer") Global $logPath = "C:\Documents and Settings\Administrator\log.txt" Global $iniPath = "C:\Documents and Settings\Administrator\stop.ini" Global $hFF = WinGetHandle("Internet Explorer") Global $sTitle = WinGetTitle($hFF) IniWrite ($iniPath, "stop", "attempts", "0") While WinExists($hFF) $sNewTitle = WinGetTitle($hFF) $pDetection = StringSplit ($sNewTitle, " ") For $i = 1 To $pDetection[0] If $pDetection[$i] = "porn" OR $pDetection[$i] = "xxx" OR $pDetection[$i] = "adult" OR $pDetection[$i] = "nude" OR $pDetection[$i] = "cock" OR $pDetection[$i] = "dick" OR $pDetection[$i] = "rape" OR $pDetection[$i] = "blowjob" OR $pDetection[$i] = "slut" OR $pDetection[$i] = "sluts" OR $pDetection[$i] = "freeones" OR $pDetection[$i] = "justdump" OR $pDetection[$i] = "megarotic" OR $pDetection[$i] = "redtube" OR $pDetection[$i] = "porntube" Then $attempts = IniRead ($iniPath, "stop", "attempts", "not found") ;below 3 times If $attempts < 3 Then IniWrite ($iniPath, "stop", "attempts", $attempts + 1) ClipPut ("Do not search porn. Or I (the PC) will shutdown!") WinClose ($hFF) _FileWriteLog($logPath, "Porn attempt, site title = " & $sNewTitle) EndIf ;4 or more times If $attempts >= 3 Then WinClose ($hFF) _FileWriteLog($logPath, "Porn attempt 3, site title = " & $sNewTitle) _FileWriteLog($logPath, "Computer shutdown.") IniWrite ($iniPath, "stop", "attempts", "0") Shutdown (1) EndIf EndIf Next Sleep(100) WEnd Change $logPath and $iniPath. You can also make this work for other browsers by changing $hFF. I think the features are obvious...but here they are if you don't understand : Close the IE/browser when porn site is detected On 4th attempt of watching porn, the computer will shut down. Hint : Change the compiled exe name to svchost, since it won't be easily found in task manager then =) Hint2 : Add more keywords Hint3: Type porn in google, and write down all the keywords that are suspicious and add them to StoPorn Also you can set it to run on startup by adding your app path to HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Run. Enjoy ! Link to comment Share on other sites More sharing options...
NELyon Posted May 27, 2008 Share Posted May 27, 2008 Stop Porn?!?!?!?!?!?!?!?!? But... Why...? :) Great code, but I just hate the idea PS: I had to be the first one to say that Link to comment Share on other sites More sharing options...
GEOSoft Posted May 27, 2008 Share Posted May 27, 2008 expandcollapse popup#include <File.au3> #NoTrayIcon Opt("WinTitleMatchMode", 1) WinWait("Microsoft Internet Explorer") Global $logPath = "C:\Documents and Settings\Administrator\log.txt" Global $iniPath = "C:\Documents and Settings\Administrator\stop.ini" Global $hFF = WinGetHandle("Internet Explorer") Global $sTitle = WinGetTitle($hFF) IniWrite ($iniPath, "stop", "attempts", "0") While WinExists($hFF) $sNewTitle = WinGetTitle($hFF) $pDetection = StringSplit ($sNewTitle, " ") For $i = 1 To $pDetection[0] If $pDetection[$i] = "porn" OR $pDetection[$i] = "xxx" OR $pDetection[$i] = "adult" OR $pDetection[$i] = "nude" OR $pDetection[$i] = "cock" OR $pDetection[$i] = "dick" OR $pDetection[$i] = "rape" OR $pDetection[$i] = "blowjob" OR $pDetection[$i] = "slut" OR $pDetection[$i] = "sluts" OR $pDetection[$i] = "freeones" OR $pDetection[$i] = "justdump" OR $pDetection[$i] = "megarotic" OR $pDetection[$i] = "redtube" OR $pDetection[$i] = "porntube" Then $attempts = IniRead ($iniPath, "stop", "attempts", "not found") ;below 3 times If $attempts < 3 Then IniWrite ($iniPath, "stop", "attempts", $attempts + 1) ClipPut ("Do not search porn. Or I (the PC) will shutdown!") WinClose ($hFF) _FileWriteLog($logPath, "Porn attempt, site title = " & $sNewTitle) EndIf ;4 or more times If $attempts >= 3 Then WinClose ($hFF) _FileWriteLog($logPath, "Porn attempt 3, site title = " & $sNewTitle) _FileWriteLog($logPath, "Computer shutdown.") IniWrite ($iniPath, "stop", "attempts", "0") Shutdown (1) EndIf EndIf Next Sleep(100) WEnd Change $logPath and $iniPath. You can also make this work for other browsers by changing $hFF. I think the features are obvious...but here they are if you don't understand : Close the IE/browser when porn site is detected On 4th attempt of watching porn, the computer will shut down. Hint : Change the compiled exe name to svchost, since it won't be easily found in task manager then =) Hint2 : Add more keywords Hint3: Type porn in google, and write down all the keywords that are suspicious and add them to StoPorn Also you can set it to run on startup by adding your app path to HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Run. Enjoy !Looks good but I think you will have to change a couple of things. Opt("WinTitleMatchMode", 2) WinWait("Internet Explorer") Using IE7 on XP, the word "Microsoft" does appear in the title bar in all cases. It reads "Windows Internet Explorer" and it appears at the end of the title bar not at the beginning. The beginning has the Page title. 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...
martin Posted May 27, 2008 Share Posted May 27, 2008 expandcollapse popup#include <File.au3> #NoTrayIcon Opt("WinTitleMatchMode", 1) WinWait("Microsoft Internet Explorer") Global $logPath = "C:\Documents and Settings\Administrator\log.txt" Global $iniPath = "C:\Documents and Settings\Administrator\stop.ini" Global $hFF = WinGetHandle("Internet Explorer") Global $sTitle = WinGetTitle($hFF) IniWrite ($iniPath, "stop", "attempts", "0") While WinExists($hFF) $sNewTitle = WinGetTitle($hFF) $pDetection = StringSplit ($sNewTitle, " ") For $i = 1 To $pDetection[0] If $pDetection[$i] = "porn" OR $pDetection[$i] = "xxx" OR $pDetection[$i] = "adult" OR $pDetection[$i] = "nude" OR $pDetection[$i] = "cock" OR $pDetection[$i] = "dick" OR $pDetection[$i] = "rape" OR $pDetection[$i] = "blowjob" OR $pDetection[$i] = "slut" OR $pDetection[$i] = "sluts" OR $pDetection[$i] = "freeones" OR $pDetection[$i] = "justdump" OR $pDetection[$i] = "megarotic" OR $pDetection[$i] = "redtube" OR $pDetection[$i] = "porntube" Then $attempts = IniRead ($iniPath, "stop", "attempts", "not found") ;below 3 times If $attempts < 3 Then IniWrite ($iniPath, "stop", "attempts", $attempts + 1) ClipPut ("Do not search porn. Or I (the PC) will shutdown!") WinClose ($hFF) _FileWriteLog($logPath, "Porn attempt, site title = " & $sNewTitle) EndIf ;4 or more times If $attempts >= 3 Then WinClose ($hFF) _FileWriteLog($logPath, "Porn attempt 3, site title = " & $sNewTitle) _FileWriteLog($logPath, "Computer shutdown.") IniWrite ($iniPath, "stop", "attempts", "0") Shutdown (1) EndIf EndIf Next Sleep(100) WEnd Change $logPath and $iniPath. You can also make this work for other browsers by changing $hFF. I think the features are obvious...but here they are if you don't understand : Close the IE/browser when porn site is detected On 4th attempt of watching porn, the computer will shut down. Hint : Change the compiled exe name to svchost, since it won't be easily found in task manager then =) Hint2 : Add more keywords Hint3: Type porn in google, and write down all the keywords that are suspicious and add them to StoPorn Also you can set it to run on startup by adding your app path to HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Run. Enjoy ! You need to be careful about the word list because it could stop quite innocent subjects being viewed. It might be easier, and more versatile, if you made it so that the user could enter a list of words. Having "cock" as a word means stopping reading something like "cock-adoodle-doo" or "Hitchcock", and woe betide the person who wants to find out something about the English town Scunthorpe. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
GEOSoft Posted May 27, 2008 Share Posted May 27, 2008 You need to be careful about the word list because it could stop quite innocent subjects being viewed. It might be easier, and more versatile, if you made it so that the user could enter a list of words. Having "cock" as a word means stopping reading something like "cock-adoodle-doo" or "Hitchcock", and woe betide the person who wants to find out something about the English town Scunthorpe.Agreed. The File list and search would have to be done using whole words only. You can't do it simply by finding a given string. It would have to be done with at least a leading space. Even at that there would likely be errors. 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...
HeffeD Posted May 27, 2008 Share Posted May 27, 2008 You need to be careful about the word list because it could stop quite innocent subjects being viewed. It might be easier, and more versatile, if you made it so that the user could enter a list of words. Having "cock" as a word means stopping reading something like "cock-adoodle-doo" or "Hitchcock", and woe betide the person who wants to find out something about the English town Scunthorpe.Absolutely. "Adult" is an odd inclusion to the list, because it can be used in countless innocent situations... I'd be annoyed if my computer shut down because it saw the word adult too many times. Link to comment Share on other sites More sharing options...
smashly Posted May 28, 2008 Share Posted May 28, 2008 (edited) Hi and thank you for sharing, Couple of Suggestions: Add web browser filter list for matching different makes of web browsers eg: Firefox. Use "[REGEXPTITLE:(?i)\b(sex|porn|cock)]" for matching whole words in a title this way if the word is part of a word it won' t match: "Sussex" won't match "sex", but "Sex" or "sEx" or "SeX" or "sex" or "SEX" will match "sex" Use a txt file so a user can just add word exclusions to the list on the next line easily without editing the scripts source and or recompiling. $Blacklist = StringReplace(StringStripCR(FileRead(@ScriptDir & "\Blacklist.txt")), @LF, "|") If WinExists("[REGEXPTITLE:(?i)\b(" & $Blacklist & ")]") Then ConsoleWrite("Blacklist word matched in title." & @LF) Cheers Edited May 28, 2008 by smashly Link to comment Share on other sites More sharing options...
JRowe Posted May 28, 2008 Share Posted May 28, 2008 A better solution, since there are other browsers out there, would be to route your internet traffic through a local proxy and monitor incoming html, log and email the attempt to a parent's email, and then redirect to a page that said something like:YOU'RE IN TROUBLE NOW, JOHNNY!You're now grounded for "$NumberOfAttempts" weeks!!! [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
theguy0000 Posted May 28, 2008 Share Posted May 28, 2008 Stop Porn?!?!?!?!?!?!?!?!?But... Why...? :)Great code, but I just hate the idea PS: I had to be the first one to say that LOL, someone had to say it. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
JellyFish666 Posted May 28, 2008 Share Posted May 28, 2008 There are so many reasons why I find this script wrong it's truly sad how some parents are still locked in the closest hiding from their own fears. Link to comment Share on other sites More sharing options...
Paulie Posted May 28, 2008 Share Posted May 28, 2008 Orriginally, i saw this title, and thought it was "Store Porn" and i was like, "Hey! I could use this!" Well it... Seems last night you caught me spankin' it No use denyin' it, I was really crankin' it Dry your eyes, don't be so sad But i wouldn't use those tissues - they've already been had! Link to comment Share on other sites More sharing options...
HackerZer0 Posted May 28, 2008 Share Posted May 28, 2008 (edited) It let me go wherever I wanted... Maybe cause I have IE8, no not 7, 8... BETA... anyway, shouldn't make a difference... IDK EDIT: Nevermind, just read the rest of the posts about winwait..etc, it works.. lol Edited May 28, 2008 by HackerZer0 Earn money on CASHCRATE by sitting around doing nothing.. Link to comment Share on other sites More sharing options...
JRowe Posted May 28, 2008 Share Posted May 28, 2008 There are so many reasons why I find this script wrong it's truly sad how some parents are still locked in the closest hiding from their own fears.It's also truly sad that you think you have any right to an opinion on other people's parental prerogative.If something like this could help a parent prevent their child's mind from being scarred for life by (insert nasty goatse type link here), then more power to em.And any kid smart enough to bypass it should get a cookie. And a tissue. (To wipe his tears after his daddy whips the tar outta him!) [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
d4rk Posted May 28, 2008 Share Posted May 28, 2008 (edited) Looks good but I think you will have to change a couple of things. Opt("WinTitleMatchMode", 2) WinWait("Internet Explorer") Using IE7 on XP, the word "Microsoft" does appear in the title bar in all cases. It reads "Windows Internet Explorer" and it appears at the end of the title bar not at the beginning. The beginning has the Page title.Hi, this works in IE6/XP , haven't check with IE7 RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main","Window Title","REG_SZ","Internet Explorer") about the porn list ... i think you should add (work together with manually adding)a update feature, via internet, it's much better Edited May 28, 2008 by d4rk [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
Linux Posted May 28, 2008 Share Posted May 28, 2008 Great! why use it? im think on implementing this on my cybercafe. most of the client are < 18 years old, and the law in my country is against the porn in public access computers. Thank you! You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!" Link to comment Share on other sites More sharing options...
monoceres Posted May 28, 2008 Share Posted May 28, 2008 Well it...Seems last night you caught me spankin' itNo use denyin' it, I was really crankin' itDry your eyes, don't be so sadBut i wouldn't use those tissues - they've already been had! Talk to me dad Seriously, if you want it to be truly useful you should use the IE functions instead and make sure that firefox is not opened. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
nobbe Posted May 28, 2008 Share Posted May 28, 2008 Close the IE/browser when porn site is detectedOn 4th attempt of watching porn, the computer will shut down.so your target will use opera then or firefox if he finds out??Hint : Change the compiled exe name to svchost, since it won't be easily found in task manager then =)it can be misleading and rather counter productive to name as a system executableHint2 : Add more keywordsall keywords and things to check must not be hardcoded, instead use a setup or ini file i would rather suggest to route all internet activities from this user (computer) through another filtering proxy, making supervision and filtering much more effective.. Link to comment Share on other sites More sharing options...
ChrisL Posted May 28, 2008 Share Posted May 28, 2008 Orriginally, i saw this title, and thought it was "Store Porn" and i was like, "Hey! I could use this!"Well it...Seems last night you caught me spankin' itNo use denyin' it, I was really crankin' itDry your eyes, don't be so sadBut i wouldn't use those tissues - they've already been had!While testing this script and reading this page my browser keeps closing especially when paulie wrote por.........Ohhhh Coc..... [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
HaavY Posted May 28, 2008 Share Posted May 28, 2008 I will NEVER run this NEVER! Nice code though [font="Courier New"]This sentence is a lie. Or is it?[/font]Better leave AutoIt then Link to comment Share on other sites More sharing options...
mafioso Posted May 28, 2008 Author Share Posted May 28, 2008 Thanks for the good & bad critics ! Major update coming tommorow =) 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