TheHidden
TheHidden

Reputation: 592

access file in php using a regex

I am trying a capture the flag game but I can only enter 50 characters in the url, I have found the name of the file but the name of the file is over 50 chars long (hence why its a challenge), the filename consists of [a-z][0-9] with a .key at the end of the file. I can execute almost all php functions via the url (as long as it doesn't go over 50 chars)

The name is unique with the .key at the end which is why I essentially wanted to use readfile(*.key);

Any suggestions?

note:

CTF is a game penetration testers play to practice their hacking skills...

I have cracked most of the web app along with source code but this is my final hurdle...

the source code its self restricts the url length to 50 characters (you know chars...strlen...)

I dont need to extend the url in the ini file it this is apart of the game.

Upvotes: 0

Views: 142

Answers (1)

Amarnasan
Amarnasan

Reputation: 15569

Use

readfile(md5('th3key').'.key'); 

It happens that the md5 function will return that string...

Upvotes: 1

Related Questions