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 | |
| # Read-only check of a Linux server for exposure to, and signs of, the PHP2Shell attacks | |
| # (CVE-2026-109618 and CVE-2026-109619, fixed in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12). | |
| # | |
| # sudo ./php2shell-check.sh [--days N] [--logs DIR]... [--webroot DIR]... | |
| # | |
| # It changes nothing and sends nothing anywhere. Run it as root so it can read the logs. | |
| # Exit code: 0 nothing found, 1 warnings, 2 a PHP version needs patching. | |
| # | |
| # A clean result is not proof the server is clean: ordinary web server logs do not record request |
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 | |
| namespace common\behaviors; | |
| use common\models\QueueDead; | |
| use yii\queue\ExecEvent; | |
| use yii\queue\Queue; | |
| class DeadLetterQueue extends \yii\base\Behavior | |
| { |
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
| { | |
| "require": { | |
| "swiftmailer/swiftmailer": "~5.2", | |
| "wildbit/swiftmailer-postmark": "^2.1" | |
| } | |
| } |
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
| PS C:\Users\csmith\PhpstormProjects\kbp> docker-compose build --no-cache | |
| Building app | |
| Step 1/2 : FROM php:7.1-fpm-alpine | |
| ---> c98b2217cb9d | |
| Step 2/2 : RUN apk update && docker-php-ext-install pdo pdo_mysql && chown -R www-data:www-data /var/www/html | |
| && sed -ri 's/^www-data:x:82:82:/www-data:x:1000:50:/' /etc/passwd | |
| ---> Running in 3c8826d8fdce | |
| fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz | |
| fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz | |
| v3.4.6-165-g6b9a79f [http://dl-cdn.alpinelinux.org/alpine/v3.4/main] |
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 | |
| require_once 'vendor/autoload.php'; | |
| use Postmark\PostmarkClient; | |
| use Postmark\Models\PostmarkException; | |
| class Mail { | |
| protected $to; | |
| protected $from; | |
| protected $sender; |
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 | |
| // Add meta query clause | |
| $args['meta_query'][] = array( | |
| 'relation' => 'AND', | |
| array( | |
| 'key' => 'wp_user_alerts_user_ids', | |
| 'compare' => 'NOT EXISTS' | |
| ) | |
| ); |
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 | |
| add_filter( 'register_taxonomy_args', 'wp_event_calendar_types_metabox_cb', 10, 2 ); | |
| add_filter( 'wp_terms_checklist_args', 'wp_event_calendar_radio_walker', 10, 1 ); |
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 | |
| // Exit if accessed directly | |
| defined( 'ABSPATH' ) || exit; | |
| /** Walker_Category_Checklist class */ | |
| require_once( ABSPATH . 'wp-admin/includes/class-walker-category-checklist.php' ); | |
| /** | |
| * Extends Walker_Category_Checklist and uses radio input instead of checklist | |
| * | |
| * @since 0.4.1 | |
| */ |
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 | |
| error_reporting(0); // do not log errors to... anywhere :) | |
| $databaseHost = 'localhost'; | |
| $databaseName = ''; | |
| $databaseUser = ''; | |
| $databasePassword = ''; | |
| $databaseTable = ''; | |
| $phpAuthUser = ''; | |
| $phpAuthPass = ''; |
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 | |
| // English -> Japanese examples from Google Translate | |
| return array( | |
| 'SD Card Program List' => 'SDカードのプログラムリスト', | |
| 'Name' => '名前', | |
| 'Created' => '作成', | |
| 'Modified' => '変更されました', | |
| 'No programs listed yet' => 'なしのプログラムがまだ表示されません', | |
| 'Create program' => 'プログラムを作成します', |
NewerOlder