vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Break my code (https://vborg.vbsupport.ru/showthread.php?t=50593)

filburt1 03-21-2003 08:01 PM

Break my code
 
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:
Quote:

this is a <? test ?>
And it returned this:
Quote:

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

Quote:

<?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:

Quote:

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 ;)

Code:

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

PHP Code:

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
PHP Code:

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
PHP Code:

 this is the <? admin ? >


flup 03-22-2003 06:37 AM

PHP Code:

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:
Code:

OMG i'm so <? f*cking l33t ?> man!!!!

Dean C 03-22-2003 09:55 AM

Entered:

PHP Code:

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:

Quote:

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

[high]* Mist cheers at breaking the turtle's code :p[/high]


All times are GMT. The time now is 09:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01092 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete