how this level was programed??

Secure agent

rym123
9 years ago

0

hello,
i already completed this level.but, I would like to know how the server or web page “hack this"was configured that this level will be completed only when the user agent is secure_user_agent.
thank you :)

12replies
7voices
269views
Mugi [Mugiwara27]
9 years ago

0

Maybe with something like
if ( navigator.userAgent.match (/secure_user_agent/i) return true; else return false;

rym123
9 years ago | edited 9 years ago

0

thank you !! i find this instruction in the source code ??

Mugi [Mugiwara27]
9 years ago

0

No you can’t find it on source code

rym123
9 years ago

0

so where can i find it

Mugi [Mugiwara27]
9 years ago

0

You can’t find it as I said but you can create your own one

rym123
9 years ago

0

ok thanks a lot :)

Mr. Cyph3r [MrCyph3r]
9 years ago

1

Actually this is something you check on server side, hence you will not find the code on the source of the page…

Usually, if using php, $_SERVER[ ‘HTTP_USER_AGENT’] will hold the user agent string:

[quote=php.net]‘HTTP_USER_AGENT’
Contents of the User-Agent: header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page. A typical example is: Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586). Among other things, you can use this value with get_browser() to tailor your page’s output to the capabilities of the user agent. [/quote]

nakee
9 years ago

0

You can find it in the source code, just the source code of the php not the source code of the client..

OmegaExtern
9 years ago | edited 9 years ago

0

@Mugiwara27 Invalid expression. ‘)’ token is expected to close if-condition. Also why do it :( way?
When you can do it smart way:
return navigator.userAgent.match(/secure_user_agent/i);

@rym123 Don’t forget to close the thread if you have solved this level.

Mugi [Mugiwara27]
9 years ago

0

OmegaExtern : It was just an example ;)


0

I need help to complete basic+ lvl2

? [bolofecal]
9 years ago

0

Do you know the meaning of “User agent”?

The site will only authenticate browsers with the correct user agent.

You must be logged in to reply to this discussion. Login
1 of 13

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss