Skip to content

Instantly share code, notes, and snippets.

View rm77's full-sized avatar
💭
(to be) or not (to be) = (to be)

Roy rm77

💭
(to be) or not (to be) = (to be)
  • surabaya, indonesia
View GitHub Profile
@rm77
rm77 / mk-vxlan.sh
Created April 22, 2024 06:38 — forked from djoreilly/mk-vxlan.sh
Linux VxLAN performance test setup script
#!/bin/bash
set -xe
# $0 host dev remote_ip
# host is 1 or 2
# on vmA
# ./mk-vx.sh 1 ens3 10.10.10.9
# on vmB
# ./mk-vx.sh 2 ens3 10.10.10.15
@rm77
rm77 / ipint.go
Created April 20, 2024 12:51 — forked from ammario/ipint.go
Golang IP <-> int conversion
func ip2int(ip net.IP) uint32 {
if len(ip) == 16 {
return binary.BigEndian.Uint32(ip[12:16])
}
return binary.BigEndian.Uint32(ip)
}
func int2ip(nn uint32) net.IP {
ip := make(net.IP, 4)
binary.BigEndian.PutUint32(ip, nn)
@rm77
rm77 / wpa_supplicant.conf
Created April 5, 2024 03:59 — forked from aspyct/wpa_supplicant.conf
Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file. I used this to connect to my university's wireless network.
# Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file.
# I used this to connect to my university's wireless network on Arch linux.
# Here's the command I used:
#
# wpa_supplicant -i wlan0 -c ./wpa_supplicant.conf
#
network={
ssid="YOUR_SSID"
scan_ssid=1
@rm77
rm77 / xz-backdoor.md
Created April 1, 2024 04:13 — forked from aalex954/xz-backdoor.md
xz-utils backdoor situation

FAQ on the xz-utils backdoor

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that gives developers lossless compression. This package is commonly used for compressing release tarballs, software packages, kernel images, and initramfs images. It is very widely distributed, statistically your average Linux or macOS system will have it installed for

@rm77
rm77 / dhcp-event
Created February 4, 2024 07:56 — forked from tomoconnor/dhcp-event
Thingy for updating powerdns backend when stuff changes
#!/usr/bin/env python
import MySQLdb
import os, sys
import pprint
pp = pprint.PrettyPrinter()
mysql_host = "localhost"
mysql_user = "dbusername"
mysql_pass = "dbpassword"
@rm77
rm77 / Makefile
Created June 8, 2023 13:33 — forked from 0851/Makefile
Basic cross-platform reverse shell in Go
EXE = shell
SRC = .
LDFLAGS = -ldflags="-s -w"
windows:
GOOS=windows go build -o $(EXE)_win.exe $(LDFLAGS) $(SRC)
macos:
GOOS=darwin go build -o $(EXE)_macos $(LDFLAGS) $(SRC)
@rm77
rm77 / Makefile
Created June 8, 2023 13:33 — forked from 0851/Makefile
Basic cross-platform reverse shell in Go
EXE = shell
SRC = .
LDFLAGS = -ldflags="-s -w"
windows:
GOOS=windows go build -o $(EXE)_win.exe $(LDFLAGS) $(SRC)
macos:
GOOS=darwin go build -o $(EXE)_macos $(LDFLAGS) $(SRC)
@rm77
rm77 / index.html
Created May 24, 2023 04:31 — forked from Humerus/index.html
Docker Exec Web Console
<html>
<head>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script src="//cdn.rawgit.com/chjj/term.js/0b10f6c55d5113d50d0ff94b6c38a46375a5f9a5/src/term.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
@rm77
rm77 / hitungwa.py
Created August 2, 2021 05:09
hitung jumlah chat wa, downloadlah wa history ke nama file file.txt, dan jalankan python3 hitungwa.py
from datetime import datetime
import re
#datetime.strptime(h[0],'%m/%d/%y, %I:%M %p')
f = open('file.txt','r')
hasil = f.readlines()
ss = dict()
for i in hasil:
h = i.split('-',1)
waktu = h[0]
@rm77
rm77 / play-youtube.sh
Last active July 19, 2021 03:08
play url from command line
#!/bin/sh
#need to install youtube-dl and mplayer
#apt install -y mplayer youtube-dl
URL=$1
mplayer $(youtube-dl -x --audio-format mp3 -g $URL)