ExtBasic 8 Tutorial

Learn how to do code review

ExtBasic 8 Tutorial

Post by sandwich on Tue May 13, 2008 9:58 am
([msg=2355]see ExtBasic 8 Tutorial[/msg])

So Bill Gates was tired of VisualBasic and now did some Perl, too bad; this script has a security flaw that allows everyone access to the company records! Fix the flaw for him!

#!/usr/bin/perl

chomp(my $User = `/usr/bin/whoami`);

print "Checking your access level...\n";

if ($User == 'BillGates')
{
print "Authorized! Here are the company records:\n" . `cat /home/BillGates/CompanyRecords.db`;
die("Closing...\n");
}

die("You're not authorized!\n");


OK, so there seems to be quite a lot of emphasis on the fact that it's Bill Gates. He's used to C++ (and VB) syntax, which gives us a clue. Is there something about Perl syntax that differs quite significantly from most languages?

Perhaps this will help:
***SPOILER***http://www.ozzu.com/programming-forum/perl-single-line-statement-blocks-t59123.html***SPOILER***

Essentially this should be simple for anyone who's experienced in Perl (which incidentally doesn't include myself :S) - hope I haven't given *too* much away
sandwich
New User
New User
 
Posts: 7
Joined: Mon May 12, 2008 5:30 pm
Blog: View Blog (0)


Re: ExtBasic 8 Tutorial

Post by omniwrath540 on Thu May 15, 2008 2:43 pm
([msg=2519]see Re: ExtBasic 8 Tutorial[/msg])

That link really isn't relevant. A better link would be [one about perl operators] that site is a tutorial that goes over what you need to know to beat the mission
omniwrath540
New User
New User
 
Posts: 1
Joined: Wed Apr 30, 2008 3:51 pm
Blog: View Blog (0)


Re: ExtBasic 8 Tutorial

Post by CutThroat on Sun May 18, 2008 9:07 am
([msg=2729]see Re: ExtBasic 8 Tutorial[/msg])

If you decided not to follow the links above which are huge spoilers, you just need to actually learn some perl, instead of guessing what things do based on other languages.
CutThroat
New User
New User
 
Posts: 4
Joined: Thu May 01, 2008 1:21 pm
Blog: View Blog (0)


Re: ExtBasic 8 Tutorial

Post by supr_k9 on Sat Jun 07, 2008 1:03 pm
([msg=4190]see Re: ExtBasic 8 Tutorial[/msg])

the first link was awesome. it had everything needed to solve this mission.

the second link...well all i get is a blank, empty page
supr_k9
New User
New User
 
Posts: 2
Joined: Mon Apr 21, 2008 11:11 pm
Blog: View Blog (0)


Re: ExtBasic 8 Tutorial

Post by filosfer on Sun Jun 08, 2008 6:45 am
([msg=4260]see Re: ExtBasic 8 Tutorial[/msg])

omniwrath540 thanks buddy that was really a nice link, it help me out . .
filosfer
New User
New User
 
Posts: 2
Joined: Sun Jun 08, 2008 6:05 am
Blog: View Blog (0)


Re: ExtBasic 8 Tutorial

Post by alien_av on Fri Jun 13, 2008 11:49 am
([msg=4701]see Re: ExtBasic 8 Tutorial[/msg])

well, replacing the things talked about at the links for the correct ones didn't work for me =\ do i need to make additional changes?

-edit-
done it now
Last edited by alien_av on Sat Jan 02, 2010 7:49 am, edited 1 time in total.
alien_av
New User
New User
 
Posts: 3
Joined: Tue Jun 10, 2008 5:36 pm
Blog: View Blog (0)


Re: ExtBasic 8 Tutorial

Post by OneArrow on Wed Jun 25, 2008 8:26 am
([msg=5724]see Re: ExtBasic 8 Tutorial[/msg])

After copying the code and trying it locally (with the original code, and my own apparently correct solution), I think the mission may be bugged. Can someone else confirm?
OneArrow
Poster
Poster
 
Posts: 123
Joined: Thu May 22, 2008 8:26 pm
Blog: View Blog (0)


Re: ExtBasic 8 Tutorial

Post by sharpskater69 on Wed Jun 25, 2008 6:15 pm
([msg=5762]see Re: ExtBasic 8 Tutorial[/msg])

Mission is fine, I just checked. With the link already posted, I don't think it would spoiling to tell you that strings are checked differently from numbers in Perl.
sharpskater69
New User
New User
 
Posts: 34
Joined: Tue Apr 22, 2008 4:10 pm
Blog: View Blog (0)


Re: ExtBasic 8 Tutorial

Post by OneArrow on Wed Jun 25, 2008 7:52 pm
([msg=5769]see Re: ExtBasic 8 Tutorial[/msg])

sharpskater69 wrote:Mission is fine, I just checked. With the link already posted, I don't think it would spoiling to tell you that strings are checked differently from numbers in Perl.


I've used the correct string comparison - like I said, I actually tested the code on my machine to make sure I wasn't missing anything (it's been a while since I've used Perl, but not that long :p). It didn't work earlier today, but it seems to be working now, thank you.
OneArrow
Poster
Poster
 
Posts: 123
Joined: Thu May 22, 2008 8:26 pm
Blog: View Blog (0)


Re: ExtBasic 8 Tutorial

Post by Mortecai4 on Sun Jul 06, 2008 12:09 pm
([msg=6694]see Re: ExtBasic 8 Tutorial[/msg])

Is the error in this code a syntax error or what?
i don't see whats wrong with it.
Mortecai4
New User
New User
 
Posts: 44
Joined: Wed Apr 23, 2008 2:14 pm
Blog: View Blog (0)


Next

Return to Extended Basics

Who is online

Users browsing this forum: No registered users and 0 guests

cron