I'm currently doing an online CTF and I have LFI an can read the source code of the upload function. In there I see the following line:
shell_exec('rm -rf ' . directory/ . '*.p*');
So anytime I upload a .php file, it gets deleted.
Is there a way to break out the code so the remove of
*.p* file never happens or can I execute .php files without having the file extension being .php?