@ 2016-07-26T07:46:08Z <?php
$dn="cn=admin";
$pass="\x00\x41";
if (empty($dn) or empty($pass)) { exit(); } //check for empty strings
//if (preg_match('/[^a-zA-Z]/',$dn) or preg_match('/[^a-zA-Z0-9\x20!@#$%^&*()]/',$pass)) { exit(); } //check for expected values (whitelisting)
//if (preg_match('/\x00/',$dn) or preg_match('/\x00/',$pass)) { exit(); } //check for null byte (blacklisting)
$ldapconn=ldap_connect("challenge01.root-me.org", "54013") or die("Could not connect to LDAP server.");
if ($ldapconn) {
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
$ldapbind=ldap_bind($ldapconn, $dn, $pass);
if ($ldapbind) {
echo("success");
} else {
echo("fail");
}
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.19 , 8.3.0 - 8.3.7 Fatal error: Uncaught Error: Call to undefined function ldap_connect() in /in/umN77:7
Stack trace:
#0 {main}
thrown in /in/umN77 on line 7
Process exited with code 255 . Output for 5.6.0 - 5.6.40 Fatal error: Call to undefined function ldap_connect() in /in/umN77 on line 7
Process exited with code 255 . preferences:dark mode live preview
248.25 ms | 401 KiB | 293 Q