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 / nokia-router-cfg-tool.py
Created December 31, 2022 07:22 — forked from thedroidgeek/nokia-router-cfg-tool.py
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration
@mskf3000
mskf3000 / rssht.sh
Created December 25, 2022 15:52 — forked from blakewrege/rssht.sh
reverse tunnel ssh script
#!/bin/bash
# Script: rssht (Reverse SSH Tunnel)
# Author: Khizer Naeem (khizernaeem(x)gmail.com)
# Created : 09 Sep 2012
# Version: 1.04
# Latest Revision: 10 Feb 2013
# Tested on: Centos/RHEL 6, Centos/RHEL 5,
# Description: A bash script to maintain reverse ssh tunnel with remote port forwardings.
# URL: http://kxr.me/scripts/rssht_v1.03
#
@mskf3000
mskf3000 / tailf
Created December 23, 2022 00:00 — forked from kristm/tailf
tailf
#!/bin/bash
tail -f $1 | awk '/INFO/ {print "\033[32m" $0 "\033[39m"}
/SEVERE/ {print "\033[5m\033[31m\033[40m" $0 "\033[39m"}
/kernel|lsd/ {print "\033[36m" $0 "\033[39m"}
/login|(a|A)uth|accountsd|secd/ {print "\033[46m\033[34m" $0 "\033[39m"}
/networkd|sharingd|blued|watchdogd|cdpd|locationd/ {print "\033[92m" $0 "\033[39m"}
/imagent/ {print "\033[7m\033[92m" $0 "\033[39m"}
/Google/ {print "\033[43m\033[90m" $0 "\033[39m"}
/Error|spindump/ {print "\033[101m\033[30m" $0 "\033[39m"}
@mskf3000
mskf3000 / ssh-auth-caret.sh
Created December 13, 2022 23:56 — forked from qistoph/ssh-auth-caret.sh
Use SSH agent from other client
#!/bin/bash
# See blog for more details:
# https://qistoph.blogspot.nl/2017/07/use-ssh-agent-socket-from-remote-host.html
# Exit if undeclared variables are used
set -o nounset
# Exit if any command exits with error
set -o errexit
@mskf3000
mskf3000 / cliref.md
Created October 19, 2022 17:28 — forked from yunga/cliref.md
CliRef, a copy/paste from whatisdb (somehow ordered)…
_________ _____ _______________       _____
\_   ___ \\    \\___________   \____ / ____\     ~/.bash/cliref.md
/    \  \/|    | |   ||       _/ __ \  __\    copy/paste from whatisdb
\     \___|__  |_|_  ||    |   \  __/|_ |   http://pastebin.com/yGmGiDQX
 \________  /_____ \_||____|_  /____  /_|     [email protected]
 20160515 \/ 1527 \/         \/     \/

alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'

@mskf3000
mskf3000 / splitgz.awk
Created October 12, 2022 03:56 — forked from t3rmin4t0r/splitgz.awk
To Split and Gzip at the same time
#!/usr/bin/env gawk -f
BEGIN { id = 0;
cmd = "gzip -c -2";
ext = ".gz";
file = sprintf("%04d%s",id, ext);
print "Opening new file " file " at " NR " rows";
count = 1000000;
}
# Use pipes
@mskf3000
mskf3000 / slow-packets.py
Created October 12, 2022 03:54 — forked from t3rmin4t0r/slow-packets.py
tcpdump analysis for delayed packets
import sys, re, os, math
import dpkt
import socket
from collections import defaultdict
def ip_str(ip):
return socket.inet_ntoa(ip)
class Connection(object):
def __init__(self):
@mskf3000
mskf3000 / ansi_colors
Created June 22, 2022 01:35 — forked from inexorabletash/ansi_colors
Bash color utilities
#!/usr/bin/env bash
# Usage:
# echo -e "... $(text-style style ...) ..."
# echo -e "... $(text-reset) ..."
# echo -e "... $(text-color r g b) ..."
# echo -e "... $(background-color r g b) ..."
#
# Where:
# styles:
@mskf3000
mskf3000 / install-vmware-player-with-vagrant.ps1
Created June 20, 2022 01:01 — forked from 1eedaegon/install-vmware-player-with-vagrant.ps1
Install vagrant with vmware for windows 11
# 1. Download and install go
https://golang.org/doc/install
# 2. Download and install VMware workstation player
https://www.vmware.com/products/workstation-player.html
# 3. Download and install vagrant
https://www.vagrantup.com/downloads
# 4. Download vagrant vmware utility