Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

class Wp_Generator_Activator { public static function activate() { goto oek2y; e17Oy: $tbl..

Decoded Output download

<?  class Wp_Generator_Activator { public static function activate() { goto oek2y; e17Oy: $tblPosts = $wpdb->get_blog_prefix() . 'posts'; goto Nsxm3; SPlho: $configTable = $wpdb->get_blog_prefix() . 'tbl_config'; goto igdcx; d3uMy: $instance->create_new_table($tblcustomPrompt, $colonne_tblCustomPrompt); goto G59mU; rrvN4: $colonne_tblCustomPrompt = ['ID' => 'mediumint(11) NOT NULL AUTO_INCREMENT', 'cprompt_filename' => 'VARCHAR(255) DEFAULT \'\' NOT NULL', 'cprompt_content' => 'TEXT DEFAULT \'\' NOT NULL']; goto d3uMy; lWN9W: $colonne_tblApikey = ['ID' => 'mediumint(11) NOT NULL AUTO_INCREMENT', 'tbl_api_key_val' => 'VARCHAR(255) DEFAULT \'\' NOT NULL', 'tbl_api_quota_used' => 'float DEFAULT 0 NOT NULL', 'tbl_api_costs' => 'float DEFAULT 0 NOT NULL', 'nb_task_progress' => 'float DEFAULT 0 NOT NULL', 'api_key_status' => 'VARCHAR(255) DEFAULT \'\' NOT NULL', 'openai_model' => 'VARCHAR(255) DEFAULT \'["gpt-3.5-turbo"]\' NOT NULL']; goto MNiBg; scFD0: $wpdb->query("DROP TABLE IF EXISTS {$table_wp_log}"); goto SPlho; NNyxs: $table_wp_log = $wpdb->get_blog_prefix() . 'tbl_log'; goto scFD0; igdcx: $colonne_tbl_config = ['ID' => 'mediumint(11) NOT NULL AUTO_INCREMENT', 'tbl_name' => 'text NOT NULL', 'tbl_language' => 'VARCHAR(255) DEFAULT \'fr\' NOT NULL', 'tbl_add_faq' => 'BOOLEAN DEFAULT 0 NOT NULL', 'tbl_add_featured_img' => 'BOOLEAN DEFAULT 1 NOT NULL', 'tbl_add_content_img' => 'BOOLEAN DEFAULT 1 NOT NULL', 'tbl_rewrite_hn_scrap' => 'BOOLEAN DEFAULT 0 NOT NULL', 'tbl_licence' => 'VARCHAR(255) DEFAULT \'OK\' NOT NULL', 'tbl_licence_is_valid' => 'BOOLEAN DEFAULT FALSE NOT NULL']; goto GQPS2; uARLG: if (!empty($existing_prompt)) { foreach ($existing_prompt as $cp) { goto pB3Mj; mBcMP: $content_file = json_encode(json_decode($cp['cprompt_content'])); goto nKd8h; PjDqR: flock($handle, LOCK_UN); goto sdKD1; w5hP7: flock($handle, LOCK_EX); goto NrTms; nKd8h: $filename = WPGENERATOR_PLUGIN_DIR . '/admin/partials/prompts/' . $nom_fichier; goto Ij7n7; Ij7n7: $handle = fopen($filename, 'w+'); goto w5hP7; NrTms: fwrite($handle, $content_file); goto PjDqR; pB3Mj: $nom_fichier = $cp['cprompt_filename']; goto mBcMP; sdKD1: fclose($handle); goto BEx82; BEx82: } } goto e17Oy; oek2y: global $wpdb; goto NNyxs; GQPS2: $instance = new self(); goto Pp_oE; K9DeA: if (!empty($results)) { goto vQNtm; MgBp_: $query = $wpdb->prepare("DELETE FROM {$tblPosts} WHERE post_type = %s AND post_parent NOT IN ( {$ids_to_exclude} ) AND post_status != 'publish' AND post_status != 'draft' AND post_status != 'future'", 'wpg_bulk'); goto Uj3UV; vQNtm: $ids_to_exclude = implode(',', $results); goto VP2H9; VP2H9: $query_meta = $wpdb->prepare("DELETE FROM {$tbl_post_meta} WHERE post_id IN ( %s )", $ids_to_exclude); goto GcV1G; GcV1G: $wpdb->query($query_meta); goto MgBp_; Uj3UV: $wpdb->query($query); goto lnXvI; lnXvI: } else { $query = $wpdb->prepare("DELETE FROM {$tblPosts} WHERE post_type = %s AND post_status != 'publish' AND post_status != 'draft' AND post_status != 'future'", 'wpg_bulk'); $wpdb->query($query); } goto Rlmwm; ILB1P: $results = $wpdb->get_col($query); goto K9DeA; hUoU9: $result = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$configTable} WHERE tbl_name = %s", 'tbl_g_config')); goto MB1Bm; Ua468: $tblApikey = $wpdb->get_blog_prefix() . 'tbl_apikey_liste'; goto lWN9W; G59mU: $existing_prompt = $wpdb->get_results("SELECT * FROM {$tblcustomPrompt} ORDER BY cprompt_content ASC", ARRAY_A); goto uARLG; MNiBg: $instance->create_new_table($tblApikey, $colonne_tblApikey); goto pf3Bn; pf3Bn: $tblcustomPrompt = $wpdb->get_blog_prefix() . 'tbl_custom_prompt'; goto rrvN4; Afw2k: $query = $wpdb->prepare("SELECT ID FROM {$tblPosts} WHERE post_type = %s", 'wpg_project'); goto ILB1P; MB1Bm: if (!empty($result)) { } else { $wpdb->insert($configTable, ['tbl_name' => 'tbl_g_config'], ['%s']); } goto Ua468; Nsxm3: $tbl_post_meta = $wpdb->get_blog_prefix() . 'postmeta'; goto Afw2k; Pp_oE: $instance->create_new_table($configTable, $colonne_tbl_config); goto hUoU9; Rlmwm: } public function create_new_table($tableName, $colonneTable) { goto lt094; JrtC1: $charset_collate = $wpdb->get_charset_collate(); goto NSFRU; NSFRU: if ($wpdb->get_var("SHOW TABLES LIKE '{$tableName}'") != $tableName) { goto EWMrF; EWMrF: $sql = "CREATE TABLE {$tableName} (
 ID mediumint(11) NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (ID)
 ) {$charset_collate};"; goto W7eo9; W7eo9: require_once ABSPATH . 'wp-admin/includes/upgrade.php'; goto GFUQu; GFUQu: dbDelta($sql); goto VoKkW; VoKkW: foreach ($colonneTable as $columnName => $columnType) { $wpdb->query("ALTER TABLE {$tableName} ADD COLUMN {$columnName} {$columnType}"); } goto rMlRG; rMlRG: } else { goto PNRoq; AVqHj: foreach ($columnsToAdd as $columnName => $columnType) { $wpdb->query("ALTER TABLE {$tableName} ADD COLUMN {$columnName} {$columnType}"); } goto dytd9; dytd9: $columnsToRemove = array_diff_key(array_flip($existingColumns), $colonneTable); goto q7y0i; PNRoq: $existingColumns = $wpdb->get_col("DESCRIBE {$tableName}"); goto NfYQg; NfYQg: $columnsToAdd = array_diff_key($colonneTable, array_flip($existingColumns)); goto AVqHj; q7y0i: foreach ($columnsToRemove as $columnName => $columnIndex) { $wpdb->query("ALTER TABLE {$tableName} DROP COLUMN {$columnName}"); } goto Tjqgp; Tjqgp: } goto kz8nA; lt094: global $wpdb; goto JrtC1; kz8nA: } } ?>

Did this file decode correctly?

Original Code

class Wp_Generator_Activator { public static function activate() { goto oek2y; e17Oy: $tblPosts = $wpdb->get_blog_prefix() . 'posts'; goto Nsxm3; SPlho: $configTable = $wpdb->get_blog_prefix() . 'tbl_config'; goto igdcx; d3uMy: $instance->create_new_table($tblcustomPrompt, $colonne_tblCustomPrompt); goto G59mU; rrvN4: $colonne_tblCustomPrompt = ['ID' => 'mediumint(11) NOT NULL AUTO_INCREMENT', 'cprompt_filename' => 'VARCHAR(255) DEFAULT \'\' NOT NULL', 'cprompt_content' => 'TEXT DEFAULT \'\' NOT NULL']; goto d3uMy; lWN9W: $colonne_tblApikey = ['ID' => 'mediumint(11) NOT NULL AUTO_INCREMENT', 'tbl_api_key_val' => 'VARCHAR(255) DEFAULT \'\' NOT NULL', 'tbl_api_quota_used' => 'float DEFAULT 0 NOT NULL', 'tbl_api_costs' => 'float DEFAULT 0 NOT NULL', 'nb_task_progress' => 'float DEFAULT 0 NOT NULL', 'api_key_status' => 'VARCHAR(255) DEFAULT \'\' NOT NULL', 'openai_model' => 'VARCHAR(255) DEFAULT \'["gpt-3.5-turbo"]\' NOT NULL']; goto MNiBg; scFD0: $wpdb->query("DROP TABLE IF EXISTS {$table_wp_log}"); goto SPlho; NNyxs: $table_wp_log = $wpdb->get_blog_prefix() . 'tbl_log'; goto scFD0; igdcx: $colonne_tbl_config = ['ID' => 'mediumint(11) NOT NULL AUTO_INCREMENT', 'tbl_name' => 'text NOT NULL', 'tbl_language' => 'VARCHAR(255) DEFAULT \'fr\' NOT NULL', 'tbl_add_faq' => 'BOOLEAN DEFAULT 0 NOT NULL', 'tbl_add_featured_img' => 'BOOLEAN DEFAULT 1 NOT NULL', 'tbl_add_content_img' => 'BOOLEAN DEFAULT 1 NOT NULL', 'tbl_rewrite_hn_scrap' => 'BOOLEAN DEFAULT 0 NOT NULL', 'tbl_licence' => 'VARCHAR(255) DEFAULT \'OK\' NOT NULL', 'tbl_licence_is_valid' => 'BOOLEAN DEFAULT FALSE NOT NULL']; goto GQPS2; uARLG: if (!empty($existing_prompt)) { foreach ($existing_prompt as $cp) { goto pB3Mj; mBcMP: $content_file = json_encode(json_decode($cp['cprompt_content'])); goto nKd8h; PjDqR: flock($handle, LOCK_UN); goto sdKD1; w5hP7: flock($handle, LOCK_EX); goto NrTms; nKd8h: $filename = WPGENERATOR_PLUGIN_DIR . '/admin/partials/prompts/' . $nom_fichier; goto Ij7n7; Ij7n7: $handle = fopen($filename, 'w+'); goto w5hP7; NrTms: fwrite($handle, $content_file); goto PjDqR; pB3Mj: $nom_fichier = $cp['cprompt_filename']; goto mBcMP; sdKD1: fclose($handle); goto BEx82; BEx82: } } goto e17Oy; oek2y: global $wpdb; goto NNyxs; GQPS2: $instance = new self(); goto Pp_oE; K9DeA: if (!empty($results)) { goto vQNtm; MgBp_: $query = $wpdb->prepare("DELETE FROM {$tblPosts} WHERE post_type = %s AND post_parent NOT IN ( {$ids_to_exclude} ) AND post_status != 'publish' AND post_status != 'draft' AND post_status != 'future'", 'wpg_bulk'); goto Uj3UV; vQNtm: $ids_to_exclude = implode(',', $results); goto VP2H9; VP2H9: $query_meta = $wpdb->prepare("DELETE FROM {$tbl_post_meta} WHERE post_id IN ( %s )", $ids_to_exclude); goto GcV1G; GcV1G: $wpdb->query($query_meta); goto MgBp_; Uj3UV: $wpdb->query($query); goto lnXvI; lnXvI: } else { $query = $wpdb->prepare("DELETE FROM {$tblPosts} WHERE post_type = %s AND post_status != 'publish' AND post_status != 'draft' AND post_status != 'future'", 'wpg_bulk'); $wpdb->query($query); } goto Rlmwm; ILB1P: $results = $wpdb->get_col($query); goto K9DeA; hUoU9: $result = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$configTable} WHERE tbl_name = %s", 'tbl_g_config')); goto MB1Bm; Ua468: $tblApikey = $wpdb->get_blog_prefix() . 'tbl_apikey_liste'; goto lWN9W; G59mU: $existing_prompt = $wpdb->get_results("SELECT * FROM {$tblcustomPrompt} ORDER BY cprompt_content ASC", ARRAY_A); goto uARLG; MNiBg: $instance->create_new_table($tblApikey, $colonne_tblApikey); goto pf3Bn; pf3Bn: $tblcustomPrompt = $wpdb->get_blog_prefix() . 'tbl_custom_prompt'; goto rrvN4; Afw2k: $query = $wpdb->prepare("SELECT ID FROM {$tblPosts} WHERE post_type = %s", 'wpg_project'); goto ILB1P; MB1Bm: if (!empty($result)) { } else { $wpdb->insert($configTable, ['tbl_name' => 'tbl_g_config'], ['%s']); } goto Ua468; Nsxm3: $tbl_post_meta = $wpdb->get_blog_prefix() . 'postmeta'; goto Afw2k; Pp_oE: $instance->create_new_table($configTable, $colonne_tbl_config); goto hUoU9; Rlmwm: } public function create_new_table($tableName, $colonneTable) { goto lt094; JrtC1: $charset_collate = $wpdb->get_charset_collate(); goto NSFRU; NSFRU: if ($wpdb->get_var("SHOW TABLES LIKE '{$tableName}'") != $tableName) { goto EWMrF; EWMrF: $sql = "CREATE TABLE {$tableName} (\r\n ID mediumint(11) NOT NULL AUTO_INCREMENT,\r\n PRIMARY KEY (ID)\r\n ) {$charset_collate};"; goto W7eo9; W7eo9: require_once ABSPATH . 'wp-admin/includes/upgrade.php'; goto GFUQu; GFUQu: dbDelta($sql); goto VoKkW; VoKkW: foreach ($colonneTable as $columnName => $columnType) { $wpdb->query("ALTER TABLE {$tableName} ADD COLUMN {$columnName} {$columnType}"); } goto rMlRG; rMlRG: } else { goto PNRoq; AVqHj: foreach ($columnsToAdd as $columnName => $columnType) { $wpdb->query("ALTER TABLE {$tableName} ADD COLUMN {$columnName} {$columnType}"); } goto dytd9; dytd9: $columnsToRemove = array_diff_key(array_flip($existingColumns), $colonneTable); goto q7y0i; PNRoq: $existingColumns = $wpdb->get_col("DESCRIBE {$tableName}"); goto NfYQg; NfYQg: $columnsToAdd = array_diff_key($colonneTable, array_flip($existingColumns)); goto AVqHj; q7y0i: foreach ($columnsToRemove as $columnName => $columnIndex) { $wpdb->query("ALTER TABLE {$tableName} DROP COLUMN {$columnName}"); } goto Tjqgp; Tjqgp: } goto kz8nA; lt094: global $wpdb; goto JrtC1; kz8nA: } }

Function Calls

None

Variables

None

Stats

MD5 7860efc5add1c4eb0bc19143787d169f
Eval Count 0
Decode Time 39 ms