Skip to content

Instantly share code, notes, and snippets.

View mskf3000's full-sized avatar
💭
I may be slow to respond.

MSKF3000 mskf3000

💭
I may be slow to respond.
View GitHub Profile
@mskf3000
mskf3000 / httpx-cp-responses.sh
Created May 16, 2024 23:21 — forked from mhmdiaa/httpx-cp-responses.sh
Copy responses from httpx's output to their original file names
cat urls.txt | httpx -json -store-response -output httpx.json
cat httpx.json | jq -r '"\(.stored_response_path) \(.path | ltrimstr("/"))"' | xargs -n 2 sh -c 'mkdir -p "$(dirname $2)" && cp $1 $2' sh
@mskf3000
mskf3000 / vpstest
Created March 19, 2024 04:25 — forked from snail007/vpstest
vpstest
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# Description: Auto test download & I/O speed script
# Thanks: LookBack <[email protected]>; Nils Steinger; Teddysun
# Toyo: https://doub.io
# H2YTech: https://minecloud.asia
# For https://VPS.BEST
RED='\033[0;31m' && GREEN='\033[0;32m' && YELLOW='\033[0;33m' && PLAIN='\033[0m'
@mskf3000
mskf3000 / 7requests_per_second.sh
Created January 24, 2024 13:10 — forked from ginokent/7requests_per_second.sh
秒間7リクエスト送りたい
PARALLEL=7
TARGET=http://127.0.0.1:8080/
N=$(seq 1 ${PARALLEL:?}) && while :; do printf "${TARGET:?}\n%.s" ${N} | xargs -P"${PARALLEL:?}" -I{} curl -sS {} -o /dev/null -w "response_code:%{response_code}\ttime_total:%{time_total}\n"; done | tee /tmp/loadtest_$(date +%Y%m%d_%H%M%S).log
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface list member
add interface=ether1 list=WAN
/ip firewall address-list
add address=192.168.0.0/16 list=Bogon
add address=10.0.0.0/8 list=Bogon
@mskf3000
mskf3000 / Bash stdout to file - Logger.md
Created November 4, 2023 06:40 — forked from fire1ce/Bash stdout to file - Logger.md
Bash stdout to file - Logger

Add the code below to .sh file.

# Optional:
# exec 1<&- # Close STDOUT file descriptor
# exec 2<&- # Close STDERR FD

parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) 
LOG_FILE=$parent_path'/error.log' #log file name

THIS GIST WON'T BE UPDATED ANY MORE (24/10/18)

Follow the progress of this project here 3os.org Raspberry Pi 3 TOR Access Point Router Project

Network: Router RJ45 <--> Ethernet Port on Raspberry <--> TOR <--> Raspberry WIFI AC <--> WIFI CLIENT

# -- Download Rasbian Strech Lite from: https://www.raspberrypi.org/downloads/raspbian/
@mskf3000
mskf3000 / README.md
Created October 7, 2023 08:01 — forked from s1037989/README.md
ip-discover: Setup a device for discovery on a network using socat

ip-discover

Setup a device for discovery on a network using socat

On the device to be discovered:

  • Copy ip-discovery to /usr/bin and run chmod +x /usr/bin/ip-discovery
  • Copy ip-discovery.service to /etc/systemd/system, adjust the code-word, and run sudo systemctl daemon-reload && sudo systemctl start ip-discovery

On the device wanting to discover the device to be discovered:

  • Copy ip-discover to your home folder and run . ~/ip-discover
$ echo -n -e "\x3c\x97\x0e\x1d\x3f\x07\xf8\x32\xe4\xc0\x48\xab\x00\x02\x61\x62" | sudo socat -t 1 -lu -x -d -d -d -d - SOCKET-SENDTO:17:3:0:x0003x02000000x0000x00x06x3c970e1d3f070000
2020/06/22 04:34:56.306263 socat[762494] D getpid()
2020/06/22 04:34:56.306315 socat[762494] D getpid() -> 762494
2020/06/22 04:34:56.306322 socat[762494] D setenv("SOCAT_PID", "762494", 1)
2020/06/22 04:34:56.306329 socat[762494] D setenv() -> 0
2020/06/22 04:34:56.306332 socat[762494] D setenv("SOCAT_PPID", "762494", 1)
2020/06/22 04:34:56.306337 socat[762494] D setenv() -> 0
2020/06/22 04:34:56.306341 socat[762494] I socat by Gerhard Rieger and contributors - see www.dest-unreach.org
2020/06/22 04:34:56.306345 socat[762494] I This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
2020/06/22 04:34:56.306349 socat[762494] I This product includes software written by Tim Hudson ([email protected])
@mskf3000
mskf3000 / stun.sh
Created October 7, 2023 07:56 — forked from kenoir/stun.sh
Proxy local port to remote host via SSH
#!/bin/bash
#Usage: ./stun.sh [email protected] [Destination port] [Local port (optional)]
DESTINATION=$1
DEST_PORT=$2
PROXY_PORT=$((RANDOM%10000+10000))
#Set local port to same as remote if unset
@mskf3000
mskf3000 / socat_socks_proxy.sh
Created October 7, 2023 07:52 — forked from lene/socat_socks_proxy.sh
Using tor as SOCKS proxy with SOCAT
socat TCP-LISTEN:<localport> SOCKS4A:localhost:<host>:<remoteport>,socksport=9050
# for example, to ssh into secret.shell.server.org via tor, do:
$ socat TCP-LISTEN:22222 SOCKS4A:localhost:secret.shell.server.org:22,socksport=9050 &
$ ssh localhost -p 22222