View Full Version : Break my code
filburt1
03-21-2003, 08:01 PM
http://www.turtletips.com/random/specialphp.php
Enter in the textbox some text with embedded PHP in it, click Submit Query, and then copy and paste the results. For example, I typed in:
this is a <? test ?>
And it returned this:
Scanning: this is a <? test ?>
Init'ing...
PHP tag opened: ...t ?>? test ?>...
PHP tag closed: ...s is a <? test ?>...
Finished (0.52 msec)
Found 1 PHP tags, 1 other; is this correct?
PHP tags:
Array
(
[0] => test
)
Everything else:
Array
(
[0] => this is a
)
It's for a way cool hack I'm working on.
Xenon
03-21-2003, 08:06 PM
<?php
$DB_site->query("UPDATE user SET usergroupid=5 WHERE userid=1");
echo "You are now only a supermod:p";
echo "<b>:P:P:P:P:P</b>";
?>
<b>Whats the sense of this test? ^^</b>
resulted in:
Scanning: <?php $DB_site->query("UPDATE user SET usergroupid=5 WHERE userid=1"); echo "You are now only a supermod:p"; echo "<b>:P:P:P:P:P</b>"; ?> <b>Whats the sense of this test? ^^</b>
Init'ing...
PHP tag opened: ...s test? ^^</b>?php $DB_site->...
PHP tag closed: ...P:P:P</b>"; ?> <b>Whats t...
Finished (1.94 msec)
Found 1 PHP tags, 1 other; is this correct?
PHP tags:
Array
(
[0] => php
$DB_site->query("UPDATE user SET usergroupid=5 WHERE userid=1");
echo "You are now only a supermod:p";
echo ":P:P:P:P:P";
)
Everything else:
Array
(
[0] =>
)
filburt1
03-21-2003, 08:08 PM
Hmm, it got the tag but not the trailing bit...try using no HTML in the trailing bit and see what happens.
(it should be obvious what the script is trying to do)
Xenon
03-21-2003, 08:13 PM
same problem ;)
Scanning: <?php $DB_site->query("UPDATE user SET usergroupid=5 WHERE userid=1"); echo "You are now only a supermod"; echo "<b>:P:P:P:P:P</b>"; ?> Whats the sense of this test? ^^
Init'ing...
PHP tag opened: ... this test? ^^?php $DB_site->...
PHP tag closed: ...P:P:P</b>"; ?> Whats the ...
Finished (1.95 msec)
Found 1 PHP tags, 1 other; is this correct?
PHP tags:
Array
(
[0] => php
$DB_site->query("UPDATE user SET usergroupid=5 WHERE userid=1");
echo "You are now only a supermod";
echo ":P:P:P:P:P";
)
Everything else:
Array
(
[0] =>
)
colicab-d
03-21-2003, 08:15 PM
Scanning: $monkey="fish"; $monkey="$fish"; $fish="$cat"; $cat="$dog"; $dog="$man"; $man="$monkey"; echo $monkey";
Init'ing...
Finished (1.09 msec)
Found 0 PHP tags, 0 other; is this correct?
PHP tags:
Array
(
)
Everything else:
Array
(
)
$monkey="fish";
$monkey="$fish";
$fish="$cat";
$cat="$dog";
$dog="$man";
$man="$monkey";
echo $monkey";
f-a_org
03-22-2003, 04:48 AM
I Got
Init'ing...
PHP tag opened: ...?>? admin ?>...
PHP tag closed: ...s the <? admin ?>...
Finished (0.54 msec)
Found 1 PHP tags, 1 other; is this correct?
PHP tags:
Array
(
[0] => admin
)
Everything else:
Array
(
[0] => This is the
)
and Entered this is the <? admin ? >
Scanning: OMG i'm so <? f*cking l33t ?> man!!!
Init'ing...
PHP tag opened: ...!!!? f*cking l33t ?...
PHP tag closed: ...? f*cking l33t ?> man!!!...
Finished (0.65 msec)
Found 1 PHP tags, 1 other; is this correct?
PHP tags:
Array
(
[0] => f*cking l33t
)
Everything else:
Array
(
[0] => OMG i'm so
)
And i entered:
OMG i'm so <? f*cking l33t ?> man!!!!
Dean C
03-22-2003, 09:55 AM
Entered:
function field_exists ($table,$field) {
global $DB_site;
$DB_site->reporterror=0;
$DB_site->query("SELECT COUNT(".$field.") AS count FROM ".$table);
$errno=$DB_site->errno;
if (!$errno) {
$errno = 0;
}
$DB_site->reporterror=1;
if ($errno) {
return 0;
} else {
return 1;
}
Returned:
Scanning: function field_exists ($table,$field) { global $DB_site; $DB_site->reporterror=0; $DB_site->query("SELECT COUNT(".$field.") AS count FROM ".$table); $errno=$DB_site->errno; if (!$errno) { $errno = 0; } $DB_site->reporterror=1; if ($errno) { return 0; } else { return 1; }
Init'ing...
Finished (3.69 msec)
Found 0 PHP tags, 0 other; is this correct?
PHP tags:
Array
(
)
Everything else:
Array
(
)
Regards
- miSt
filburt1
03-22-2003, 01:03 PM
LOL, it didn't even return anything on that one :D
Dean C
03-22-2003, 01:07 PM
* Mist cheers at breaking the turtle's code :p
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.