Skip to content

Instantly share code, notes, and snippets.

View iamramahibrah's full-sized avatar
🏠
Working from home

Ramadhan Ibrahim iamramahibrah

🏠
Working from home
View GitHub Profile
@iamramahibrah
iamramahibrah / case.sh
Created August 24, 2021 13:20
Case Statement in shell script!!!
#!/usr/bin/bash
###############################
# Case statement shell script
# Author iamramahibrah
###############################
echo -e -n "
Choose one scripting language below
===============
import os
hostname = "8.8.8.8"
for ip in hostname:
response = os.system("ping -c1 >/dev/null "+ hostname)
if response == 0:
print("Connected")
else:
print("Disconnected")
@iamramahibrah
iamramahibrah / tcp.pyshark.py
Created July 16, 2021 18:41
pyshark pcap tcp file parsing
import pyshark
def cap(pkt):
capture = pyshark.FileCapture("Pcap file location here", dispaly_filter="tcp")
for i in capture:
print(i.tcp)
cap()
@iamramahibrah
iamramahibrah / c-header.sh
Last active July 14, 2021 11:24
vmware c header files matching your running kernel were found. ERROR Solved
#!/bin/bash
# vmware c header file matching error solution
# update system to current version
sudo apt-get update
sudo apt-get upgrade -y
# install buld essential
sudo apt-get install build-essential -y
@iamramahibrah
iamramahibrah / wg0.conf
Last active June 30, 2021 19:35
Wireguard Config File
[Interface]
Address = 192.168.168.1/24 # IPV4 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
PrivateKey = sGEPcI+wbFvwq8YwiHluREFbGXa9QzRsfrA8pyLb81A=
ListenPort = 51820
[Peer]
PublicKey = B1Oyq4HertWCcK8YBWETfoHICnFN4+tCfyouxsdhWhs= # Client public key
AllowedIPs = 10.10.0.2/32, fd86:ea04:1111::2/128 # IPs client can connect as
def int():
import netifaces
interface = netifaces.gateways()['default'][netifaces.AF_INET]
print("===[Network Information]===")
print ("==>", *interface)
int()
#!/bin/bash
#=====================================
# OPEN SSH SERVER UPGRADE SCRIPT
#=====================================
function colors()
{
RED="\033[1;31m"
GREEN="\033[1;32m"
#!/bin/bash
#*********************************
# Ramadhan ibrahim (https://ramadhanibrahim.com/)
# Licensed - https://unlicense.org/
# Social Media: @iamramahibrah
# Fixes a corrupt .zsh_history file
#**********************************
function zsh()
@iamramahibrah
iamramahibrah / Key Sublime Text 3.2.1 Build 3207 - Sublime Text 3 License Key
Created April 28, 2021 05:46
Key Sublime Text 3.2.1 Build 3207 - Sublime Text 3 License Key
Key Sublime Text 3.2.1 Build 3207
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
@iamramahibrah
iamramahibrah / sysinfo.py
Created April 27, 2021 17:14
Systeminformation
import platform, getpass, socket
import os
#os func
os.system('clear')
def os():
print("*********System Information**********")
print
node = platform.node()
os = platform.system()