Skip to content

Instantly share code, notes, and snippets.

View abousselmi's full-sized avatar
🐪
Seeking oasis

ab abousselmi

🐪
Seeking oasis
View GitHub Profile
@abousselmi
abousselmi / bmc.py
Created January 3, 2024 16:34 — forked from czechnology/bmc.py
Simple tool to parse the BMC web console of a Nokia Airframe rack server and retrieve the MAC addresses of all available interfaces. Output as ASCII table or tab-separated values (for simple copying to a spreadsheet).
#!/usr/bin/env python
"""
Simple tool to parse the BMC web console of a Nokia Airframe rack server and
retrieve the MAC addresses of all available interfaces. Output as ASCII table
or tab-separated values (for simple copying to a spreadsheet).
Example usage:
./bmc.py -u admin -p admin 10.11.12.101 10.11.12.102 10.11.12.103
Tested with BMC Web UI version 1.00.0, KVM Remote Console Utility Version
@abousselmi
abousselmi / NetworkingFirecracker.md
Created January 3, 2024 16:36 — forked from s8sg/NetworkingFirecracker.md
Networking with Firecracker

Create Bridge interface on the host and give internet access

sudo ip link add name br0 type bridge
sudo ip addr add 172.20.0.1/24 dev br0
sudo ip link set dev br0 up
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables --table nat --append POSTROUTING --out-interface enp3s0 -j MASQUERADE
sudo iptables --insert FORWARD --in-interface br0 -j ACCEPT

Create a tap device and link to the bridge

@abousselmi
abousselmi / ssh_jump.py
Created January 3, 2024 16:36 — forked from tintoy/ssh_jump.py
SSH via jump-hosts using Paramiko
#!/usr/bin/env python3
import os
import paramiko
ssh_key_filename = os.getenv('HOME') + '/.ssh/id_rsa'
jumpbox_public_addr = '168.128.52.199'
jumpbox_private_addr = '10.0.5.10'
target_addr = '10.0.5.20'
@abousselmi
abousselmi / regex-arabic.md
Created January 3, 2024 16:38 — forked from Humoud/regex-arabic.md
Detecting arabic characters with regex.

Detect all Arabic Characters:

/[\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\uFDF0-\uFDFD]/

Summary:

  Arabic (0600—06FF, 225 characters)

  Arabic Supplement (0750—077F, 48 characters)