This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| SITE="" | |
| while [[ $# -gt 0 ]]; do | |
| case "$1" in | |
| --site=*) | |
| SITE="${1#*=}" | |
| shift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # CVE-2026-31431 ("Copy Fail") — pure-bash static vulnerability checker | |
| # | |
| # Exit codes: | |
| # 0 = NOT VULNERABLE (patched kernel or preconditions not met) | |
| # 1 = INCONCLUSIVE | |
| # 2 = LIKELY VULNERABLE | |
| # 3 = MITIGATED (workaround applied, kernel not yet patched) | |
| # | |
| # Use only on hosts you own or are explicitly authorized to test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Maintenance Hooks for WordPress | |
| * @author CODE TOT <khoi@codetot.com> | |
| * @link https://baotriweb.codetot.vn | |
| **/ | |
| // Reject comments containing URLs in the comment text or website field | |
| function codetot_maintenance_reject_comments_with_urls($commentdata) { | |
| // Check the comment content for URLs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Malware plugin keep redirection to other site - WP Hack Exploit | |
| /** | |
| * Plugin Name: Performance Enhancer | |
| * Plugin URI: | |
| * Description: Enhances website performance through optimized resource loading | |
| * Version: 1.0.0 | |
| * Author: | |
| * License: GPL2 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $counter = 0; | |
| $content = preg_replace_callback( | |
| '/<img([^>]+)>/i', | |
| function ($matches) use (&$counter) { | |
| $counter++; | |
| $imgTag = $matches[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Bulk Image Resizer for PHP & MySQL Applications | |
| * Automatically detects Imagick or GD. | |
| * | |
| * @package codetot-optimization | |
| * @author codetot, khoipro, gemini | |
| * @since 0.0.1 | |
| * | |
| * Usage: copy to your project, and run 'php php-bulk-resize-image.php' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Sử dụng: paste đoạn code vào trong file theme functions.php | |
| // Không cần nếu bạn đã tắt comment trên web | |
| function codetot_prevent_urls_in_comment_content( $commentdata ) { | |
| $comment_content = $commentdata['comment_content']; | |
| $url_pattern = '/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/i'; | |
| if ( preg_match( $url_pattern, $comment_content ) ) { | |
| wp_die( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Use redis cache | |
| * | |
| * @package codetot-optimization | |
| * @author codetot | |
| * @since 0.0.1 | |
| */ | |
| class Sample_Redis_Cache { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin> | |
| <link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.3.2/lazysizes.min.js" as="script" /> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.3.2/lazysizes.min.js"> | |
| </head> | |
| <body> | |
| <div class="in-first-view"> | |
| <img src="image-1.jpg" width="640" height="480" alt=""> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CPU = 4 | |
| # RAM = 8GB | |
| # Website = WordPress, WooCommerce, >1k products | |
| # Cache = W3 Total Cache | |
| [mysql] | |
| port = 3306 | |
| [mysqld] | |
| performance_schema = ON |
NewerOlder