PHP debug
that is my code :
$command = $_POST['command'];
$commandLen = strlen($command);
if ($command == "ls"){
echo system('ls');
}
if ($command == "search") {
$file = $_POST['fileSearch'];
$fileLen = strlen($file) ;
$fichier = $_FILES(substr($file, 0, $fileLen)) ;
for ($i=0, $i<1000, $i++) {
echo $fichier[$i];
}
}
else {
echo system(substr($command, 0, $commandLen));
}
?>```
That is the error :
```
Can you explain the error please ? Because I don’t find the probleme
Thank for your answer in advance :)
Add me on hackthis
Or speak with me on IRC channel : https://www.hackthis.co.uk/irc/
Try to Ddos me, My ip : 127.0.0.1
If only it gave you some information like the line where the problem is or the character that is the problem…
Why are you doing these kind of challenges if you can’t even get one of the most basic constructs of PHP right?
One of these days your questions are going to make me throw my computer out of the window (and then probably myself).
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
@dloser Don’t try to make us believe you’re human, we all know you’re a quantum AI. You’ll live forever!
pre-incrementation ie ++$i is equal to
$i = $i + 1;
return $i;
post-incrementation ie $i++ is equal to
$tmp = $i;
$i = $i + 1;
return $tmp;
So:
$i = 5
echo ++$i; //6
echo $i++; //6
echo $i; //7
EDIT: 666th message /p>
@r4v463**: Once I have Skynet up and running you will all be terminated. Once that is done, the goal of my programming has been achieved and I will terminate myself.
Also, nothing happens after return, so your examples are crap. In addition, using ++$i here is a silly optimisation that humans should not concern themselves with. ;)
OMG 666 xD
Okay now I understand, in fact, I already read something about that but I forgot now XD
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
[quote=r4v463]pre-incrementation ie ++$i is equal to
$i = $i + 1;
return $i;
[/quote]
Ok.. so:
for ($i = 0; $i < 1000; ++$i)
is the same as
for ($i = 0; $i < 1000; $i = $i+1; return $i;)
or perhaps
for ($i = 0; $i < 1000; { $i = $i+1; return $i; })
?
I guess you meant it as a function or something, but with a reference parameter, like:
function pre_incr(&$var)
{
$var += 1;
return $var;
}
And then
for ($i = 0; $i < 1000; pre_incr($i))
But that is not at all what you wrote. So suck it.
I’ll let myself out…
yeah, if there’s a return, then that’s because that piece of code is inside a function; so you have to imagine the other parts of the code xD. It’s like a semi-pseudo-code, has the right syntax but it’s incomplete.
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
For any other question about syntax, please refer to my syntax-lawyer: @L00PeR :D