Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 2nd, 2005, 12:56 PM   #1
ProjectX
Programmer
 
ProjectX's Avatar
 
Join Date: Feb 2005
Posts: 37
Rep Power: 0 ProjectX is on a distinguished road
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
}
}
tell me what you think of it. Its my first one
ProjectX is offline   Reply With Quote
Old Dec 2nd, 2005, 12:59 PM   #2
eclipsed4utoo
Newbie
 
Join Date: Dec 2005
Posts: 7
Rep Power: 0 eclipsed4utoo is on a distinguished road
is this suppose to be a hacker program?
eclipsed4utoo is offline   Reply With Quote
Old Dec 2nd, 2005, 1:11 PM   #3
ProjectX
Programmer
 
ProjectX's Avatar
 
Join Date: Feb 2005
Posts: 37
Rep Power: 0 ProjectX is on a distinguished road
no just a kind of a joke thing
ProjectX is offline   Reply With Quote
Old Dec 2nd, 2005, 1:21 PM   #4
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
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."
Infinite Recursion is offline   Reply With Quote
Old Dec 2nd, 2005, 1:29 PM   #5
eclipsed4utoo
Newbie
 
Join Date: Dec 2005
Posts: 7
Rep Power: 0 eclipsed4utoo is on a distinguished road
Quote:
Originally Posted by Infinite Recursion
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...
well i knew it wouldn't connect to anything...but that step could be easily added. i was wondering if this was the beginning of a "hacker" program.

and yes, indenting would help out greatly.
eclipsed4utoo is offline   Reply With Quote
Old Dec 2nd, 2005, 2:20 PM   #6
ProjectX
Programmer
 
ProjectX's Avatar
 
Join Date: Feb 2005
Posts: 37
Rep Power: 0 ProjectX is on a distinguished road
thanks alot guys I will work on it. And if I put my mind to it it can be transformed in a hacker program
ProjectX is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:32 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC