Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

The Perl Game 21

The Perl Game 21

Home
The Perl Game 21
Calendar

Vulnerabilities/Exploits:
BlackICE Port 113
BlackICE Way's Changed?


Contact The Web-Master

You just used Our Program 21. It was created using the Perl Programming Language. We had many Difficulties but in the end it all worked out. The Program is started using an MS-DOS Batch File that we created.
The Batch file looks like this:

@ECHO OFF
Echo Welcome to the 2002 Tech Fair! This is our Perl Program Called 21. Have Fun!
PAUSE
21.pl

cd C:\Program Files\Internet Explorer\
IEXPLORE.EXE http://www.desertcode.netfirms.com/21.shtml
cd C:\Documents and Settings\Owner\My Documents
ECHO Thank You For Playing!
EXIT

This basically says is not to show all the commands that go through but to say "Welcome to the 2002 Tech Fair! This is our Perl Program Called 21. Have Fun!" Then to pause and wait for you to hit the Enter Key. Once you hit the Enter Key it runs the actual program 21. Which looks like this :< P> #!usr/bin/local/perl -w


$firstcards=int(rand 21);
if ($firstcards == 0)
{ $firstcards = int(rand 21);
}


print "Your cards are $firstcards\n";
print "Would you like to hit\n";
print "Press 1 for yes\n";
$answer=;
$secondcards=int(rand 11);
$total = $firstcards + $secondcards;

if ($answer == 1)
{
print "Your total is $total";
return 0;
}

print "You won ";

This just tells the computer to pick a random number between 1 and 11 then see if you want another number. When you hit 1 it grabs another number and then adds them up to see if they equal 21. If they do equal 21 than the computer says that you won! After all of that is done it to go to internet explorer and open our website Desert Code to this page, which is the card-games home page. Afterwards it says "Thank You For Playing!" then it is done.
That's how it works and everything to it.

This Web-page was created using SSI's (Server-Side includes) which pulls multiple files (The table of contents, the spinning clock (which was made in JavaScript), and the main text together inside the server before you see it!) to create one page.