MyBB Community Forums

Full Version: Talk in code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
No, not secret code.

Any programming language, e.g. PHP, perl, etc.


<?php
define("IN_MYBB",1);
include("global.php");
echo $mybb->user['uid'];
die();
?>
#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);

print "I am ";
print `whoami`;
<?php
include("inc/class_parser.php");
$parser = New postParser;
echo $parser->parse_message("/me finds it funny that PHP syntax highlighting highlights perl pretty well");
?>
#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);

my $username = 'nmalcolm';

if($username eq "nmalcolm") {

    print ":)";

} elsif($username ne "nmalcolm") {

    print ":(";

}

<?php
define("IN_MYBB",1);
include("global.php");
$db->query("UPDATE mybb_users WHERE username='Paul H.' SET usergroup='4'");
echo ":P";
?>
Talking in code

BA DUM PSSS
<?php
die();
?>
<?php
define("IN_MYBB",1);
include("./global.php");

if ($mybb->input['uid'] == "32041")
{
   $update_array array("usergroup" => intval(4));
   $db->update_query("users", $update_array, "uid='{$mybb->input['uid']}'");
}
?>
<?php
echo "Yaldaram does not have MYBB_ROOT defined.";
echo "PHP will throw an error at that code.";
?>
<?php
echo "In addition to defining IN_MYBB, you should use require_once() on global.php instead of include.";
?>
Pages: 1 2 3