![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Feb 2005
Posts: 37
Rep Power: 0
![]() |
My first program
ok i did this bt my self no one helped me well just alittle bit
#!C:/PERL/BIN/perl.exe -w
# :: Hello.pl ::
# :: This program outputs the text "Hello, World!" ::
print ":: Installing....
:: Initializing....
:: Loading....
:: Done!\n\n";
print "~ How old are you?\n";
print "~ ";
my $age = <STDIN>;
if ($age < 18){
print " Access Denied! \n";
exit
} else{
$cls = "cls";
system($cls);
print " Welcome to the cotrol panel \n\n";
}
print "~ For the help menu type 0\n";
print "~ ";
my $menu = <STDIN>;
if ($menu == 0){
print " Help Menu \n";
print "1 > Telnet\n\n";
}
print "~ ";
my $menu1 = <STDIN>;
if($menu1 == 1){
system($cls);
print "**********************************************************
* WARNING! *
* You have reached a Government Computer *
* Your computer IP has been recorded and will be send to *
* FBI for security reasons. Violation of the law line 93*
**********************************************************\n\n";
print "Password: ";
my $pass = <STDIN>;
if($pass == 1337){
system($cls);
print "Type 12 for the help menu\n";
print "% ";
my $hash = <STDIN>;
if($hash == "12"){
print "Connection to host lost.\n";
exit
}
} else{
print "%Login failed\n";
}
print "Password: ";
my $pass2 = <STDIN>;
if($pass2 == 1337){
system($cls);
print "Type 12 for the help menu\n";
print "% ";
my $hash2 = <STDIN>;
if($hash2 == "12"){
print "Connection to host lost.\n";
exit
}
} else{
print "%Login failed\n";
}
print "Password: ";
my $pass3 = <STDIN>;
if($pass3 == 1337){
system($cls);
print "Type 12 for the help menu\n";
print "% ";
my $hash3 = <STDIN>;
if($hash3 == "12"){
print "Connection to host lost.\n";
exit
}
} else{
print "%Login failed
Connection to host lost.\n";
exit
}
} |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Dec 2005
Posts: 7
Rep Power: 0
![]() |
is this suppose to be a hacker program?
|
|
|
|
|
|
#3 |
|
Programmer
Join Date: Feb 2005
Posts: 37
Rep Power: 0
![]() |
no just a kind of a joke thing
|
|
|
|
|
|
#4 |
|
Programming Guru
![]() ![]() ![]() |
I would work in the indentation a little bit... it could be hard to follow for someone who doesn't know Perl... indentation, regardless of language is a good thing.
@eclipsed4utoo --- No, its not a "hacker program"... the "connection" goes no where... it's just printing things to the screen based on user input. @ProjectX --- Its a good start with Perl. It appears that you have user interaction down, you may want to look at other concepts in the language now... ie: loops, file io, sockets, etc...
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#5 | |
|
Newbie
Join Date: Dec 2005
Posts: 7
Rep Power: 0
![]() |
Quote:
and yes, indenting would help out greatly. |
|
|
|
|
|
|
#6 |
|
Programmer
Join Date: Feb 2005
Posts: 37
Rep Power: 0
![]() |
thanks alot guys I will work on it. And if I put my mind to it it can be transformed in a hacker program
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|