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 | |
| # kill_foreign_sessions.sh | |
| # Kills session leader PIDs from `who -u` whose remote IP is not the allowed IP. | |
| # DEFAULT: dry-run mode. Set DRY_RUN=0 to actually kill. | |
| # | |
| # Usage: | |
| # DRY_RUN=1 sudo /usr/local/bin/kill_foreign_sessions.sh # just show what WOULD be killed | |
| # DRY_RUN=0 sudo /usr/local/bin/kill_foreign_sessions.sh # perform kills | |
| ALLOWED_IP="91.150.72.133" |
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 | |
| /* | |
| Plugin Name: Disable WP Rocket SaaS Deletion | |
| Description: Prevent WP Rocket from deleting SaaS-generated assets. | |
| Author: Luka | |
| */ | |
| # Remove Notices | |
| add_filter( 'rocket_dismiss_notice', '__return_true' ); | |
| # Do not automatically delete RUCSS |
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 | |
| /** | |
| * Plugin Name: WP Rocket | Ignore Query Strings | |
| * Description: Define query strings that should use the same set of cache. | |
| * Plugin URI: https://github.com/wp-media/wp-rocket-helpers/cache/wp-rocket-cache-ignore-query-strings | |
| * Author: WP Rocket Support Team | |
| * Author URI: http://wp-rocket.me/ | |
| * License: GNU General Public License v2 or later | |
| * License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
| */ |
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
| Ovo ide u server { } blok sajta: | |
| if ($block_preview_ajax) { return 403; } | |
| location = /wp-admin/admin-ajax.php { | |
| if ($is_preview_bot) { return 403; } | |
| proxy_pass https://79.101.60.115:8443; | |
| } | |
| location = /wp-content/plugins/translatepress-business/add-ons-pro/automatic-language-detection/includes/trp-ald-ajax.php { | |
| if ($is_preview_bot) { return 403; } |
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 | |
| # ============================================================================= | |
| # Nginx log → IP agregacija → Team Cymru IP→ASN (bulk, netcat) → izveštaj | |
| # - IPv4 i IPv6 podrška (posebne bulk sesije) | |
| # - Brz join (AWK mapa) umesto grep u petlji | |
| # - MIN_REQS filter za TOP IP ispis | |
| # - Keš CSV sa flock zaključavanjem (+ opcioni age keš) | |
| # - Retry + exponential backoff za bulk upite |
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 | |
| /** | |
| * WHMCS Hook - Sakrivanje Payment Gateway-a na osnovu valute | |
| * Autor: Luka @ dcx.rs | |
| * Ovaj hook sakriva: | |
| * - PayPal PPCP (paypal_ppcpv) za RSD valutu | |
| * - Bank Transfer (banktransfer) za USD valutu | |
| */ | |
| use WHMCS\Database\Capsule; |
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
| smtp_active_hostname = ${lookup{$interface_address}lsearch{/etc/exim4/virtual/helo_data}{$value}} | |
| ... | |
| remote_smtp: | |
| driver = smtp | |
| interface = ${lookup{$sender_address_domain}lsearch{/etc/exim4/virtual/interfaces}{$value}} | |
| helo_data = ${lookup{$sender_address_domain}lsearch*@{/etc/exim4/virtual/helo_domains}{$value}} | |
| root@my-vps:/var/log/exim4# cat /etc/exim4/virtual/helo_domains |
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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDtYAMj6ZcTAsgLCgHz2TnAl0lbyq/iU3msaXJaT7PfSVQYX8qQZ5tmycumEvwkgHG0bKxF6tmjuNYkSN4jWQX8McPllneDHoEwlw7nyx9lv05PsL+qziG/4MR81lETowvBbvhXN82MnbmjlV7eGuM3eyDL5v5JGxKBsPtNHTsXXfy9h5CIBLQBFbRHX9glGV/gs3wSdiw/iRAsFJ+g4YQCfdzPURwYis8shmKHeotUirlLURa7Q6PctnkTJ3sTA52aKy/3zgPtFj29Ky58yOqN/v1KIy1iBbhEzIXk7RhFN6QDsGrirL2uwBgGIOgFjg2+D2Pa8JbNLQ8KazH9qomH luka@paunovic |
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
| rm /var/www/vhosts/carocci.it/httpdocs/cache_status.txt | |
| sleep 10 | |
| sessionid=$(curl -s -A 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' --data-raw 'username=vmXXXX&password=YeXXXX' -X POST 'https://cs.cloudcenter.seeweb.it/accounts/login' -c - | grep 'sessionid' | awk '{print $NF}') | |
| csrftoken=$(curl -s 'https://cs.cloudcenter.seeweb.it/dashboard' -H 'Cookie: sessionid='$sessionid -H 'Referer: https://cloudcenter.seeweb.it/' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' -c - | grep 'csrftoken' | grep -v jQuery | awk '{print $NF}') | |
| curl -s -A 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' -H 'Cookie: sessionid='$sessionid'; csrftoken='$csrftoken -H 'X-CSRFToken: '$csrftoken -H 'Referer: https://cs.cloudcenter.seeweb.i |
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
| # WebP Express rules | |
| # -------------------- | |
| location ~* ^/?wp-content/.*\.(png|jpe?g)$ { | |
| add_header Vary Accept; | |
| expires 365d; | |
| if ($http_accept !~* "webp"){ | |
| break; | |
| } | |
| try_files | |
| /wp-content/webp-express/webp-images/doc-root/$uri.webp |
NewerOlder