Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
$this->check_validation = create_function("", "$va\x6c\x69d = get\x5fo\x70\x74\x69\x6f\x6e..
Decoded Output download
0lid = get_option("scrapes_valid");
if (!0alid)
return false;
$json = wp_remote_post("http://scrapes.octolooks.com/validate/validate.php", array(
"timeout" => 60,
"body" => array(
"submit" => 1,
"purchase_code" => get_option("scrapes_code"),
"domain" => get_option("scrapes_domain"),
"request_domain" => get_site_url()
)
));
Ol_Scrapes::write_log("Activation request: ");
Ol_Scrapes::write_log(0son["body"]);
if (is_wp_error(0n)) {
return true;
}
$json = json_decode($json["body"]);
if (!0son->error) {
$current_url = get_site_url();
0arsed = parse_url($current_url);
extract($parsed);
0rapes_domain = get_option("scrapes_domain");
0rapes_parsed_host = parse_url($scrapes_domain);
if (!in_array($host, array("localhost", "127.0.0.1", "::1"))) {
if (!preg_match("/^[^.]*\.?" . preg_quote(0crapes_parsed_host["host"]) . "$/i", $host)) {
delete_option("scrapes_valid");
delete_option("scrapes_code");
delete_option("scrapes_domain");
return false;
}
}
Ol_Scrapes::write_log("Activated for " . $current_url);
return true;
} else {
delete_option("scrapes_valid");
delete_option("scrapes_code");
delete_option("scrapes_domain");
return false;
}
Did this file decode correctly?
Original Code
$this->check_validation = create_function("", "$va\x6c\x69d = get\x5fo\x70\x74\x69\x6f\x6e(\x22\x73\x63\x72ap\x65\x73_\x76\x61lid\");\n\t\t\x69f\x20(\x21$v\x61li\x64)\n\t\t\tr\x65\x74u\x72n \x66\x61lse;\n\n\t\t$\x6a\x73\x6fn\x20\x3d \x77\x70_\x72\x65\x6d\x6f\x74e\x5fpos\x74(\x22htt\x70://\x73crape\x73\x2eoct\x6fl\x6fok\x73\x2eco\x6d/val\x69date/\x76\x61\x6ci\x64\x61t\x65.p\x68p\x22,\x20\x61\x72r\x61\x79(\n\t\t\t\x22\x74i\x6d\x65ou\x74\"\x20\x3d>\x206\x30,\n\t\t\t\x22b\x6fdy\x22\x20\x3d\x3e \x61r\x72a\x79(\n\t\t\t\t\"\x73\x75b\x6di\x74\" \x3d> 1,\n\t\t\t\t\x22p\x75\x72\x63ha\x73e\x5fc\x6f\x64\x65\"\x20\x3d\x3e g\x65\x74\x5fopt\x69o\x6e(\x22sc\x72ap\x65\x73_c\x6fde\x22),\n\t\t\t\t\x22d\x6f\x6dain\x22 => \x67\x65t\x5f\x6f\x70tio\x6e(\"sc\x72\x61pe\x73\x5fd\x6f\x6dai\x6e\"),\n\t\t\t\t\"re\x71u\x65\x73t\x5f\x64om\x61\x69n\x22 \x3d> get\x5fsi\x74e\x5furl()\n\t\t\t)\n\t\t))\x3b\n\t\tO\x6c_S\x63\x72\x61pes::w\x72ite\x5f\x6cog(\x22\x41ct\x69\x76ati\x6fn \x72equest:\x20\");\n\t\t\x4fl_\x53c\x72\x61pes::\x77ri\x74e\x5flo\x67($j\x73on[\"bo\x64y\"])\x3b\n\t\t\x69f (i\x73\x5fwp\x5fe\x72\x72\x6f\x72($jso\x6e))\x20{\n\t\t\t\x72etur\x6e t\x72u\x65;\n\t\t}\n\t\t\n\t\t$\x6a\x73\x6f\x6e = \x6a\x73on\x5fdec\x6f\x64\x65($\x6a\x73on[\x22\x62o\x64y\x22])\x3b\n\n\t\t\x69f\x20(!$j\x73\x6fn-\x3e\x65rro\x72) {\n\t\t\t$\x63\x75rr\x65\x6e\x74\x5fu\x72\x6c =\x20\x67e\x74\x5fsi\x74\x65\x5f\x75\x72\x6c()\x3b\n\t\t\t$p\x61\x72sed\x20=\x20\x70ar\x73e_url($\x63ur\x72\x65n\x74\x5furl);\n\t\t\te\x78\x74r\x61c\x74($\x70a\x72\x73\x65\x64)\x3b\n\t\t\t$sc\x72\x61\x70es_d\x6fm\x61\x69n \x3d\x20\x67\x65\x74\x5f\x6fptio\x6e(\"\x73\x63r\x61p\x65\x73\x5f\x64oma\x69n\x22);\n\t\t\t$sc\x72\x61p\x65\x73\x5fpar\x73\x65d\x5fh\x6fst \x3d p\x61r\x73e\x5fu\x72l($\x73crapes\x5f\x64o\x6d\x61i\x6e)\x3b\n\t\t\t\n\t\t\tif (\x21\x69n_\x61r\x72a\x79($\x68\x6fs\x74, \x61\x72\x72\x61y(\"l\x6fcalh\x6f\x73\x74\x22,\x20\x22\x31\x32\x37.\x30\x2e\x30.\x31\",\x20\"::\x31\"))) {\n\t\t\t\t\x69\x66\x20(!\x70re\x67_\x6d\x61\x74c\x68(\"/^[^\x2e]*\x5c.?\" . pr\x65g_\x71\x75\x6f\x74e($s\x63\x72ape\x73\x5f\x70\x61\x72\x73e\x64_h\x6f\x73t[\x22h\x6f\x73t\"])\x20. \"$/\x69\", $\x68o\x73t)) {\n\t\t\t\t\t\x64\x65l\x65\x74e_\x6f\x70\x74\x69on(\"\x73c\x72\x61\x70es\x5fva\x6c\x69d\x22);\n\t\t\t\t\tdel\x65te\x5f\x6fp\x74i\x6fn(\"scrapes\x5fc\x6fd\x65\x22);\n\t\t\t\t\td\x65\x6cete_opt\x69o\x6e(\"\x73\x63\x72\x61\x70\x65s_\x64o\x6d\x61i\x6e\")\x3b\n\t\t\t\t\t\x72et\x75\x72\x6e fa\x6cs\x65\x3b\n\t\t\t\t}\n\t\t\t}\n\t\t\tOl_Scr\x61p\x65\x73::w\x72\x69te_\x6c\x6f\x67(\"A\x63\x74\x69\x76a\x74ed\x20fo\x72\x20\x22 .\x20$\x63\x75\x72\x72\x65nt_\x75r\x6c)\x3b\n\t\t\tretu\x72\x6e\x20\x74r\x75\x65\x3b\n\t\t}\x20e\x6c\x73\x65 {\n\t\t\td\x65le\x74\x65\x5fo\x70t\x69o\x6e(\"\x73c\x72a\x70\x65s_\x76\x61l\x69\x64\x22)\x3b\n\t\t\t\x64e\x6ce\x74\x65_o\x70\x74\x69on(\"\x73\x63\x72\x61\x70\x65\x73\x5fcode\");\n\t\t\t\x64e\x6ce\x74e_opti\x6f\x6e(\"scr\x61pes_do\x6dai\x6e\");\n\t\t\t\x72e\x74\x75r\x6e\x20fals\x65\x3b\n\t\t}");
$this->mandatory_redirect = create_function("", "\x69\x66\x20(!g\x65t\x5fopt\x69\x6fn(\"sc\x72\x61pe\x73\x5fv\x61\x6ci\x64\"))\x20{\n\t\t\tOl\x5f\x53cra\x70es::wr\x69t\x65_lo\x67(\x22\x48e\x6cp\x65\x72:\x20\x6f\x66f\x6c\x69ne in\x76\x61l\x69d.\");\n\t\t\twp\x5fre\x64i\x72e\x63t(add_\x71uer\x79_a\x72g(arra\x79(\n\t\t\t\t\"\x70age\x22 =>\x20\"\x73\x63\x72ape\x73-\x73e\x74\x74i\x6e\x67\x73\",\n\t\t\t\t\x22\x70ost\x5fty\x70\x65\x22\x20=\x3e\x20\"\x73cra\x70\x65\x22,\n\t\t\t\t\"su\x63\x63\x65\x73s\x22 =\x3e\x20\x30,\n\t\t\t\t\"m\x73g\"\x20\x3d\x3e \x22\"\n\t\t\t\t\t)\n\t\t\t\t\t,\x20adm\x69\x6e\x5f\x75\x72\x6c(\x22edi\x74\x2e\x70\x68\x70\"))\n\t\t\t);\n\t\t\t\x65xit\x3b\n\t\t}");
Function Calls
create_function | 1 |
Stats
MD5 | b8cc3c1838bc211802c90fb464bdac01 |
Eval Count | 1 |
Decode Time | 111 ms |