Snippets
Short, reusable code and configuration snippets. Review before running in production.
email_alert="1"
email_addr="[email protected]"
email_ignore_clean="1"
email_subj="maldet alert from $(hostname)"
email_panel_user_alerts="0"
email_panel_from="[email protected]"
email_panel_replyto="[email protected]"
email_panel_alert_subj="maldet alert from $(hostname)"
email_format="html"
smtp_relay=""
smtp_from=""
smtp_user=""
smtp_pass=""
slack_alert="0"
Full code (99 lines) →
email_alert="1" email_addr="[email protected]" email_ignore_clean="1" email_subj="maldet alert from $(hostname)" email_panel_user_alerts="0" email_panel_from="[email protected]" email_panel_replyto="[email protected]" email_panel_alert_subj="maldet alert from $(hostname)" email_format="html" smtp_relay="" smtp_from="" smtp_user="" smtp_pass="" slack_alert="0" slack_subj="maldet alert from $(hostname)" slack_token="AUTH_TOKEN" slack_channels="maldetreports" telegram_alert="0" telegram_bot_token="TELEGRAM_BOT_TOKEN" telegram_channel_id="TELEGRAM_CHANNEL_ID" discord_alert="0" discord_webhook_url="" autoupdate_signatures="1" sigup_interval="6" autoupdate_version="1" autoupdate_version_hashed="1" cron_prune_days="21" cron_daily_scan="1" scan_days="1" import_config_url="" import_config_expire="43200" sig_import_md5_url="" sig_import_hex_url="" sig_import_yara_url="" sig_import_sha256_url="" sig_import_csig_url="" scan_hashtype="auto" scan_workers="auto" scan_clamscan="1" scan_yara="auto" scan_yara_timeout="300" scan_yara_scope="custom" scan_csig="1" scan_user_access="0" scan_user_access_minuid="1000" scan_max_depth="15" scan_min_filesize="24" scan_max_filesize="2048k" scan_hexdepth="262144" scan_hex_chunk_size="10240" scan_cpunice="19" scan_ionice="6" scan_cpulimit="0" scan_ignore_root="1" scan_ignore_user="" scan_ignore_group="" scan_find_timeout="0" scan_export_filelist="0" scan_tmpdir_paths="/tmp /var/tmp /dev/shm /var/fcgi_ipc" quarantine_hits="1" quarantine_clean="1" quarantine_suspend_user="0" quarantine_suspend_user_minuid="1000" quarantine_on_error="1" default_monitor_mode="users" inotify_base_watches="16384" inotify_sleep="15" inotify_reloadtime="3600" inotify_minuid="1000" inotify_docroot="htdocs" inotify_cpunice="18" inotify_ionice="6" inotify_cpulimit="0" digest_interval="24h" digest_escalate_hits="0" cron_digest_hook="1" monitor_paths_extra="/usr/local/maldetect/monitor_paths.extra" monitor_scan_owner_filters="0" scan_clamd_remote="0" remote_clamd_config="/etc/clamd.d/clamd.remote.conf" remote_clamd_max_retry="5" remote_clamd_retry_sleep="3" enable_statistic="0" elk_host="" elk_port="" elk_index="" session_legacy_compat="auto" string_length_scan="0" string_length="150000" scan_progress_log_interval="60" scan_meta_cleanup_age="48" maint_compress_age="30" maint_archive_age="90" post_scan_hook="" post_scan_hook_format="args" post_scan_hook_exec="async" post_scan_hook_timeout="60" post_scan_hook_on="all" post_scan_hook_min_hits="1"
Open code page →
#!/bin/bash
# ==================================================================================
# 🐕 WATCHDOG v4.0 - Intelligent Service Monitor & Auto-Recovery System
# ==================================================================================
# Universal Linux service monitoring with smart socket-activation support
#
# Features:
# ✅ Socket-activated service support (snapd, packagekit, etc.)
# ✅ Multi-tier service classification
# ✅ Advanced notification system (Email, Webhook, Telegram)
# ✅ Auto-update from GitHub
# ✅ System health monitoring
# ✅ Intelligent restart policies
# ✅ Multi-language support
Full code (1866 lines) →
disable_functions = "exec, passthru, shell_exec, system, proc_open, popen, curl_exec, curl_multi_exec, parse_ini_file, show_source, phpinfo, mail, ini_set, ini_alter, openlog, syslog, readfile, symlink, dl, leak, proc_get_status, proc_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellarg, escapeshellcmd, base64_decode"
Open code page →
disable_functions = "exec, passthru, shell_exec, system, proc_open, popen, curl_exec, curl_multi_exec, parse_ini_file, show_source, phpinfo, mail, ini_set, ini_alter, openlog, syslog, readfile, symlink, dl, leak, proc_get_status, proc_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellarg, escapeshellcmd, base64_decode"
Open code page →
#Ali Çömez Wp Yazı gösterim kodu
function getPostViews($postID){
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
return "0 Gösterim";
}
return $count.' Gösterim';
}
function setPostViews($postID) {
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
Full code (24 lines) →
#Ali Çömez Wp Yazı gösterim kodu function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); return "0 Gösterim"; } return $count.' Gösterim'; } function setPostViews($postID) { $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); }else{ $count++; update_post_meta($postID, $count_key, $count); } } #Ali Çömez Wp Yazı gösterim kodu Bitiş
Open code page →