Jump to content

Click Here if you're an adult


Recommended Posts

The local public library board asked me to find - or create - something to put on the public workstations in the adult section that will pop up a screen requiring users to declare themselves adults before proceeding on to either IE or FF.

I thought immediately of autoit, and I'm wondering if anyone's done anything like that... or at least can give me some ideas about where to start sawing and hammering?

At this point they think they just want a button to "click here if you're adultrified", but I'm thinking there's going to need to be something a little heavier-duty eventually, and probably sooner rather than later.

Any assistance will be greatly appreciated by the Brewster County Texas Public Library!

Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Link to comment
Share on other sites

change the targets of the shortcuts for ff and ie to make them point to your own executable that verifies age then if age>18 then run ff or ie. Just an idea :)

or make a program to check for instances of FF or IE and if there is, make them input and verify their age.

[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]
Link to comment
Share on other sites

Heres something i thought of for the executable/age verification:

$i = 0
While $i < 30

$age = InputBox("Age Check", "Please type your age:")
$a = 17

If $age = @error Then
    MsgBox(0, "ERROR", "Wrong age!")
    Exit
    EndIf

If $a < $age Then
    $year = InputBox("Age Check - Year of Birth", "Please type your year of birth:")
    $b = 1987
    
    If $b > $year Then
        MsgBox(0, "", "You may continue")
    Else
        MsgBox(0, "ERROR", "Wrong birth date!")
        Exit
    EndIf
EndIf
$i = $i + 1
WEnd
hope it helps, Clipper34

EDIT: I may have got the years messed up

Edited by Clipper34
Link to comment
Share on other sites

Thanks for the replies. I was thinking of putting in some "real" age checking, but... (a) I can't think of anything useful other than asking birth year and (b ) I don't think they really care, they just want SOMEthing.

It appears that the federable gummint requires them to do this and makes it stick because it gave them some money to buy computers and there were, of course, strings attached to the money. They (the Lib board) said they had been told by some bureaucRAT that there was some magic software they could buy (more grant money) that would verify age - apparently by requiring the users to enter their SSN and then checking a database. "Please press the barcode on your forehead to the scanner within ten seconds. Violators will be terminated. Thank you for using the SAFEKID System."

Anyway, here's what I came up with - it's awsomely stupid and simple, but as far as I can tell, it works... this is the FF version.

; Prompt the user to verify age
; simple version - click yes/no
$answer = MsgBox(4, " A d u l t   V e r i f i c a t i o n ", "I hereby certify that I am an adult (if unsure, ask Librarian)")
; Check the user's answer to the prompt - If "No" was clicked (7) then exit the script
$tooyoung = $answer=7;
; check if old enough to run the program
If $tooyoung Then
    MsgBox(16, " A d u l t   V e r i f i c a t i o n ", "Nanny-State Laws (probably unconstitutional) require us to deny you the use of this computer")
    Exit
EndIf
Run("C:\Program Files\Mozilla Firefox\firefox.exe");

Now, I guess I just need to make the exe's have the same icon as the originals and it's done (until they need a more rigorous age check).

Thanks again for the replies!

Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Link to comment
Share on other sites

Thanks for the replies. I was thinking of putting in some "real" age checking, but... (a) I can't think of anything useful other than asking birth year and (b ) I don't think they really care, they just want SOMEthing.

It appears that the federable gummint requires them to do this and makes it stick because it gave them some money to buy computers and there were, of course, strings attached to the money. They (the Lib board) said they had been told by some bureaucRAT that there was some magic software they could buy (more grant money) that would verify age - apparently by requiring the users to enter their SSN and then checking a database. "Please press the barcode on your forehead to the scanner within ten seconds. Violators will be terminated. Thank you for using the SAFEKID System."

Inserting your SSN on a public computer to check for age? Have these people not heard of identity theft?

My library requires you to log in to use the computer using your library card as a username. This would make much more sense than SSN and it can be linked to the library card database which would have date of birth. It also lets you track who was using the machine at what time incase that's needed. Obviously to do this properly would require more expertise than a simple Autoit script, and done properly would use a genuine login system using something like Novell or a Windows domain.

Though I suppose if one wanted they could make a database (in an INI file maybe?) of library card #'s and DOB and ask any potential user to enter library card # and DOB. This would only really be feasible with a relatively small number of users (couple hundred). This database could perhaps be stored on a mapped network drive, but it would have to be properly protected with ACLs to ensure end users couldn't access the database.

Another option would be to make a client / server setup where the client will send the library card # and DOB to a server which will then look up against the database and send back a yes or no.

These options would have major security / privacy implications if set up improperly, if the network uses switches instead of hubs, etc. as a simple setup would be broadcasting everything in clear text.

I would also hope that the machines are relatively locked down and hopefully use software like Microsoft's SteadyState or Deepfreeze.

Link to comment
Share on other sites

Inserting your SSN on a public computer to check for age? Have these people not heard of identity theft?

My library requires you to log in to use the computer using your library card as a username.

...

Yep, I thought of that one, but they use barcode tags, and the workstations don't have scanners... so there's a thirteen-digit number to type in - yeah, that's just what I want to do (actually, I've never used the computers at the library, and have no plans to do so, other than testing this installation). And, of course, then they'd have to check a database... and the database'd have to have birthdates... the whole thing sucks, sideways.

Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Link to comment
Share on other sites

could give them an alternate login for the computers at the library. That may be too much work though.

EDIT: or have them verify their age with an employee that logs in for them. That is what they did in the hotel I visited in Mexico.

Edited by metalicaman8
Link to comment
Share on other sites

could give them an alternate login for the computers at the library. That may be too much work though.

EDIT: or have them verify their age with an employee that logs in for them. That is what they did in the hotel I visited in Mexico.

I think it's ultimately up to the lib personnel to make sure.

However, that said, the real issue is not "keep the poor little children safe from pornography-peddling rapists" - the REAL issue is to make everyone using public terminals be identified. My best guess on this is that it's the thin end of the wedge - as seen so many times before - and the plan it to end up with an ID scanner on every terminal so every bit, byte, and nanosecond can be traced to a specific person. The only problem is that as far as I am aware, there has not been created a system of ID that can't be hacked...

Thanks again for all the responses - there's plenty to think about in these.

Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Link to comment
Share on other sites

Okay - that first simple/stupid script was shown to the lib folks. It's okay, but they want to show the "User Agreement" and have an Accept/Don't Accept button... this should be fairly simple, but I'm going to go cruise the sample scripts and see if anyone's already done the "EULA" thing.

Thanks to all for responding.

Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Link to comment
Share on other sites

So far I haven't found anything in the example scripts... maybe someone can point me in the right direction?

What I want to do is display a text file (call it a EULA), which may be so long that it needs a scroll bar, and have a pair of buttons labeled (something like) "Accept" and "No, Thanks"... the buttons aren't a problem, but I haven't found (in Help files either) a function builtin or udf'ed that will display a file - maybe it should be done with notepad, but it seems like it would be better to have something inside autoit to do it.

Anyone?

Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Link to comment
Share on other sites

So, I tried the slightly improved version:

; Prompt the user to verify age
; not quite so simple-minded version - display text, click yes/no
Run("notepad.exe c:\dogpenis.txt");
$answer = MsgBox(4, " A d u l t   V e r i f i c a t i o n ", "I hereby certify that I am an adult (if unsure, ask Librarian)")
; Check the user's answer to the prompt - If "No" was clicked (7) then exit the script
$tooyoung = $answer=7;
; check if old enough to run the program
If $tooyoung Then
    MsgBox(16, " A d u l t   V e r i f i c a t i o n ", "Nanny-State Laws (probably unconstitutional) require us to deny you the use of this computer")
    Exit
EndIf
Run("C:\Program Files\Mozilla Firefox\firefox.exe");

I'm not thrilled, but it works, I reckon. The question I have now is, how can I make sure that the notepad box doesn't cover up the msgbox?

Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Link to comment
Share on other sites

So, I tried the slightly improved version:

; Prompt the user to verify age
; not quite so simple-minded version - display text, click yes/no
Run("notepad.exe c:\dogpenis.txt");
$answer = MsgBox(4, " A d u l t   V e r i f i c a t i o n ", "I hereby certify that I am an adult (if unsure, ask Librarian)")
; Check the user's answer to the prompt - If "No" was clicked (7) then exit the script
$tooyoung = $answer=7;
; check if old enough to run the program
If $tooyoung Then
    MsgBox(16, " A d u l t   V e r i f i c a t i o n ", "Nanny-State Laws (probably unconstitutional) require us to deny you the use of this computer")
    Exit
EndIf
Run("C:\Program Files\Mozilla Firefox\firefox.exe");

I'm not thrilled, but it works, I reckon. The question I have now is, how can I make sure that the notepad box doesn't cover up the msgbox?

I believe that this is not the correct way of doing this. :P Just for professional looking reasons, I will have to suggest GUI over notepad.exe (:)) :P

try this:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


$Form1 = GUICreate("Form1", 480, 246, 278, 264)
$Accept = GUICtrlCreateButton("Accept", 120, 208, 75, 25, 0)
$Decline = GUICtrlCreateButton("No, Thanks", 256, 208, 75, 25, 0)
$EULAField = GUICtrlCreateEdit("", 16, 16, 441, 177, BitOR($ES_UPPERCASE,$ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL))
GUICtrlSetData(-1, StringFormat("PLEASE ENTER ALL EULA BULLSHIT IN THIS FIELD, HOWEVER \r\nUNCONSTITUTIONAL IT MAY BE.\r\n\r\nTA\r\n\r\nDA\r\n\r\nBLOW\r\n\r\nME\r\n\r\nIF YOU ARE UNDER 18, JUST CLICK ACCEPT  AND PLEAD THE 5TH IF \r\nQUESTIONED.\r\n\r\n\r\nHEHE, JUST IMPLEMENTING THE VERTACLE SCROLL BAR.\r\n\r\nYOU CAN ALSO READ THE EULA FROM AN INI IF YOU"&Chr(39)&"D LIKE\r\n\r\nFEEL SORRY FOR YOU IF YOU ARE THE ONE WRITING IT\r\n\r\nOKAY, NOW I"&Chr(39)&"M BORED\r\n\r\nI"&Chr(39)&"LL QUIT MESSING AROUND AND POST THIS FOR YOU\r\n\r\nKUDOS\r\n\r\nGOOD LUCK\r\n\r\n;)\r\n\r\nANONYMOUSE NOOBIE"))
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Sorry, I think that wordwrap doesn't work in code tags.. but if you delete the return off each line when you put it in SCITE it should all come out good.

BTW, koda does wonders for those of us who have trouble with GUI, I live by it.. has very few bugs that I have found.

OH YEAH, i didnt make the buttons usable, either. I figure you can do that part because I'm lazy

children may smile; the wise ponder- Dr. Holmes of Hardvard Medical School on an Ether BingeLove Makes The World Go Round?So does five shots of tequila. What's your point?[quote name='Valik' date='Jun 5 2008, 05:13 PM']wraithdu, 24 hours. Said I have a bad attitude, just driving the point home with a ban.[/quote]This is classic. :)
Link to comment
Share on other sites

Heres something i thought of for the executable/age verification:

$i = 0
While $i < 30

$age = InputBox("Age Check", "Please type your age:")
$a = 17

If $age = @error Then
    MsgBox(0, "ERROR", "Wrong age!")
    Exit
    EndIf

If $a < $age Then
    $year = InputBox("Age Check - Year of Birth", "Please type your year of birth:")
    $b = 1987
    
    If $b > $year Then
        MsgBox(0, "", "You may continue")
    Else
        MsgBox(0, "ERROR", "Wrong birth date!")
        Exit
    EndIf
EndIf
$i = $i + 1
WEnd
hope it helps, Clipper34

EDIT: I may have got the years messed up

change $b to @YEAR - 18.

that will not mess up.

[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]
Link to comment
Share on other sites

some kids are smart enough to distinguish what is really Firefox and what is not.

so instead, put your code in this:

While 1
Sleep(100)
If ProcessExists("firefox.exe") = True Then
ProcessClose("firefox.exe")
;your code here
;suppose you declare a variable called $age.
If $age > 18 Then
  ;place extra code here
  Run("C:\Program Files\Mozilla Firefox\firefox.exe")
Else
  ;do nothing (for me)
  ;you could place more code here
EndIf
EndIf
WEnd
[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...