Skip to content

Instantly share code, notes, and snippets.

View shutingrz's full-sized avatar

shutingrz

View GitHub Profile
@shutingrz
shutingrz / build-busybox.sh
Created December 15, 2022 20:56
build busybox binaries
#!/bin/sh
#ARCHS=${ARCHS:-"aarch64-linux-gnu mipsel-linux-gnu"}
ARCHS=${ARCHS:-"arm-linux-gnueabi arm-linux-gnueabihf powerpc64le-linux-gnu aarch64-linux-gnu mipsel-linux-gnu"}
set -e
busybox_version='busybox-1.35.0'
busybox_archive="${busybox_version}.tar.bz2"
busybox_url="https://busybox.net/downloads/${busybox_archive}"
#!/bin/sh
if [ $# -ne 1 ]; then
echo "Usage: $0 [bitrate]"
exit 1
fi
sudo ip link set can0 type can bitrate $1
sudo ip link set can0 txqueuelen 1000
sudo ip link set can0 up
@shutingrz
shutingrz / internetsim-vmware-hack.sh
Created September 8, 2019 01:13
Vitochaイメージのovaをfusionでインポートできるようにしたpainaスクリプト改変版
#!/bin/sh
ORIGINAL_OVA=${1:-./InternetSim.ova}
DESTDIR=${2:-.}
tar -C $DESTDIR -xvf $ORIGINAL_OVA
cp -ip $DESTDIR/InternetSim.ovf $DESTDIR/InternetSim.ovf_ORG
OVF_OLD_SHA1=$(shasum $DESTDIR/InternetSim.ovf_ORG | cut -d" " -f1)
sed -i "" 's/ovf:capacity="19326328320"/ovf:capacity="18" ovf:capacityAllocationUnits="GigaBytes"/' $DESTDIR/InternetSim.ovf
@shutingrz
shutingrz / iocage_setup.sh
Created March 27, 2019 18:02
こんな感じでiocage使ってる。exec_poststartはなぜかiocageでjail起動してもrc.dが動いてくれないからworkaround
#!/bin/sh
JNAME=
IP4ADDR=
IP6ADDR=
iocage create -n $JNAME -r 12.0-RELEASE \
ip4_addr="vtnet1|192.168.254.$IP4ADDR/24" \
defaultrouter=192.168.254.1 \
resolver="nameserver 192.168.254.1" \
#!/usr/local/bin/python3.6
#CVE-2017-15120 exploit.
#DO NOT ABUSE !!!
import socket
#pip install dnslib
from dnslib import RR, DNSHeader, DNSRecord, QTYPE, CNAME, CLASS
@shutingrz
shutingrz / num.rb
Last active October 13, 2016 11:55
require 'net/http'
require 'uri'
require 'openssl'
def write(msg)
token = '' # token
url = URI.parse('https://notify-api.line.me/api/notify')
req = Net::HTTP::Post.new(url.path)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
#!/usr/local/bin/ruby
#@shutingrz
require File.expand_path(File.dirname(__FILE__) + '/vitocha.rb')
# jails path
$jails='/jails'
#Operator is shutingrz!!
shu=Operator.new
@shutingrz
shutingrz / t
Created January 13, 2016 15:26
#!/bin/sh
tty=${1}
if [ "$USER" != "root" ]; then
echo "Please run as superuser or sudo!"
exit 1
fi
if [ $# -ne 1 ]; then
echo "Usage: t [name]"
require 'expect4r'
#gem install expect4r
@tftps = "" #tftpserver ipaddress or hostname
def bak_config(host,username,password, filename)
ios = Expect4r::Ios.new_telnet(
host: host,
#!/usr/local/bin/ruby
require "socket"
class Qflag
def initialize()
@qr = 0
@opcode = 0
@aa = 0
@tc = 0
@rd = 0