 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
exttreem
Joined: 31 May 2008 Posts: 2
|
Posted: Sat May 31, 2008 11:37 am Post subject: A P0RN Filter/Blocker |
|
|
Hi, Everyone!
I am novice to AHK and new to this forum!
I was in search of a simple light porn filters for my office.
After trying many blockers i discovered, it can be done by a very simple & easy trick.
So I jumped to AHK. After studying it, I have written a very short script that can block porn pages.
And it works in all available browsers.
| Code: |
#Persistent
SetTimer, Alert1, 500
Alert1:
SetTitleMatchMode RegEx
IfWinActive, i)sex ;works when this keyword comes in titlebar.
Send ^{f4} ;This closes the Tab in all browsers; or you can use 'WinKill' too. But no need!
else
IfWinActive, i)x*x
Send ^{f4}
else
IfWinActive, i)p*rn
Send ^{f4}
else
IfWinActive, i)n*ked
Send ^{f4}
else
IfWinActive, i)g*y
Send ^{f4}
else
IfWinActive, i)l*sbian
Send ^{f4}
else
IfWinActive, i)f*ck
Send ^{f4}
else
IfWinActive, i)p*ssy
Send ^{f4}
else
IfWinActive, i)free*ne
Send ^{f4}
else
IfWinActive, i)h*t, girl ;works if these two words are on same titlebar.
Send ^{f4}
else
IfWinActive, i)c*ll, girl
Send ^{f4}
else
IfWinActive, i)d*si, girl
Send ^{f4}
else
IfWinActive, i)b*be
Send ^{f4}
else
IfWinActive, i)game ;to block online games
Send ^{f4}
Return
|
Useful to block any kind of websites or a specific software by using correct keywords!
Just try to Google these keywords after running it.
Sorry to Admin for using all these keywords in the forum!
But they all are essential, and more can be added if you find them!
Hope it is useful and will be developed further!
Thanks! |
|
| Back to top |
|
 |
Zippo() Guest
|
Posted: Sat May 31, 2008 12:09 pm Post subject: |
|
|
I KNEW Microsoft was dirty!
 |
|
| Back to top |
|
 |
Oberon
Joined: 18 Feb 2008 Posts: 458
|
Posted: Sat May 31, 2008 12:15 pm Post subject: |
|
|
You can use | to match multiple criteria:
| Code: | #Persistent
Process, Priority, , L
SetTitleMatchMode, RegEx
Loop {
IfWinActive, i)sex|xxx|etc.
WinClose
Sleep, 500
} |
|
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Sat May 31, 2008 12:54 pm Post subject: |
|
|
| Quote: | | I was in search of a simple light porn filters for my office. |
Force closing windows is very user unfriendly, especially if there is a "false positive".
If you are admin, the easiest, but crudest option is to install HOSTS files. These have the disadvantage that you cannot use wildcards (so they can get huge), and the browser takes a while before it "gets" the blocking. This delay can be avoided by redirecting to a server-proxy or machine (which could return a custom "Site blocked" page) instead of to 127.0.0.1. They have the advantage that they block system wide, so not only the browsers.
Another (more customizable) option is to force-install filter scripts (Greasemonkey on FF, UserJS on Opera, Trixie(?) on IE), you can search the internet for "ad profanity sex porn filter", there are numerous filters around. This, ofcourse, only works for the specific browser(s), but has the advantage that it can be specificly tweaked to your needs (JavaScript regex + other options).
Extreme would be to force everything that connects to the internet thru a server-proxy, and filter directly.
Combine it with a process-checker/killer, instead of a window-checker/killer, like you have now (which you too can create in AHK), and done
HTH |
|
| Back to top |
|
 |
imapow
Joined: 13 Mar 2008 Posts: 162 Location: Trøndelag, Norway
|
Posted: Sun Jun 01, 2008 12:17 am Post subject: |
|
|
hey add this to the script
| Code: |
text1x := (a_screenwidth/2)-120
texty := (a_screenheight/2)-200
editx := (a_screenwidth/2)-250
maxt = 20 ;max Transparentcy
sleeptime = 50 ;speed
alert_msg =
(
you lousy porn freek.
your CO has been sent a notice of your action
)
;create the gui
gui, 1:-caption +toolwindow +alwaysontop
gui, 1:show, x0 y0 w0 h0
WinSet, Transparent, 0, %a_scriptname%
gui, 1:show, x0 y0 w%a_screenwidth% h%a_screenheight%
gui, 1:color, ff0000
gui, 1:font, cffffff s72,impact
gui, 1:add, text, vtext z72 x%text1x% y%texty%, ALERT
gui, 1:font, cffffff s9,arial black
gui, 1:add, edit, vedit s9 readonly x%editx% xm+0 x%editx% w500 r15, %alert_msg%`n`n`n`nexit by pushing enter
;open and close
loop, %maxt%
{
WinSet, Transparent, %a_index%0, %a_scriptname%
sleep, %sleeptime%
}
keywait, enter, d
transe = %maxt%
loop, %maxt%
{
transe-=1
WinSet, Transparent, %transe%0, %a_scriptname%
sleep, %sleeptime%
}
exitapp
|
_________________ -._.-¨¯¨-._.-IM@PΩW-._.-¨¯¨-._.- |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 904 Location: London, UK
|
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Sun Jun 01, 2008 10:41 am Post subject: |
|
|
| Or you could use your own DNS server, and combine it with a filter, e.g.: mod_dnsbl (*nix, Apache), or even a cache/redirector, e.g. Squid (Win, *nix)/Squidguard (*nix). |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Sun Jun 01, 2008 12:27 pm Post subject: |
|
|
Hey, NO! The term "AutoIt" shouldn't be used with your porn filter, regardless that some people out there think "it's soooooo sexy!!"   |
|
| Back to top |
|
 |
the necro-post ghost
Joined: 04 Jun 2008 Posts: 3
|
Posted: Thu Jun 05, 2008 9:38 pm Post subject: |
|
|
wye block porn? _________________ Booo... |
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Thu Jun 05, 2008 10:25 pm Post subject: |
|
|
More related:
- Internet Junkbuster Proxy (open source, Windows and *nix). The site points to Guidescope, which points to Firefox + AdBlock plugin. Old, but it can still serve as an easy and cheap solution for private and corporate use...
- Webwasher (Excellent, still. Unfortunately abandoned, multi-platform, free for personal use) ... Search for it.
- Content control/webfiltering software @ Wikipedia
- List of content-control software @ Wikipedia
| the necro-post ghost wrote: | | wye block porn? |
| exttreem wrote: | | I was in search of a simple light porn filters for my office. |
| mod_dnsbl wrote: | | Many corporations want or are almost forced by the legal situtation in their countries to censor the internet access of their employees. |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|