Alex Segesta's Computer Science Problems (Part 2)

So Alex, not knowing about the beauty of computer science, says that he will spend a couple days (oh no!) to learn about Uncle Sam from HackThisSite and how he creates his websites. He shows you the following python code that he devised up.

1
2
3
4
5
6
7
8
9
from samsPersonalSecurityModule import fileEncryptedOpening

def openSecureFile(link):
    connection = fileEncryptedOpening.openWithHttps(link+"/8m0L4K8h");
    fileEncryptedOpening.storePassword(connection,outputText)
    outputText = "";
    fileEncryptedOpening.stripHeader("Uncle Sam's Password:",outputText);
    return outputText;
print openSecureFile("http://bitbin.it");

What was the output?

Assume that the functions do what they are basically told to do.

openWithHttps opens a link (like opening a tab)

storePassword gets the content of important text on a webpage. (takes in two arguments, where to go, and where to store text/output)

stripHeader takes off n, where n is the first argument.


The answer is 123454321.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

There is not much to tell. Just open this link

LOL but I have a doubt. you are assigning outputText to a null right after asking it to store the value from the site. Question seems off.

Bala Tweakbytes - 7 years, 2 months ago

Stop using my real name.

Alex Segesta - 7 years, 2 months ago

Log in to reply

Ok :(

Kevin Mo - 7 years, 2 months ago

Log in to reply

I mean as in change the name of this problem.

Alex Segesta - 7 years, 1 month ago

Log in to reply

@Alex Segesta You still didn't change it...

Alex Segesta - 7 years, 1 month ago

I am assuming that the output must be a string. But I don't know. What 's your idea guys?

Gene Luke Cortes - 7 years, 2 months ago

Log in to reply

That is true... But you can probably tell; strings aren't allowed in Brilliant.

Kevin Mo - 7 years, 2 months ago

Kevin and I are buddies.

Alex Segesta - 7 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...