I hereby claim:
- I am mrizvic on github.
- I am mrizvic (https://keybase.io/mrizvic) on keybase.
- I have a public key ASDjoPvQ5ox-txhPJRPfq9xhEaK1DrZc6_LQs15tt1cx9go
To claim this, I am signing this object:
### DHCP PACKETS FROM/TO CLIENT WITH MAC ADDRESS 7c:2f:80:22:58:fe | |
tcpdump -vve -l -nn -s0 -v -i eth1 'udp[36:4] == 0x7c2f8022 && udp[40:2] == 0x58fe' | |
### LCP OVER PPPOE PACKETS | |
### https://www.wireshark.org/lists/wireshark-users/200712/msg00182.html | |
tcpdump -ei enp1s0 pppoes and ppp proto 0xc021 | |
### CDP PACKETS | |
### https://medium.com/@hybby/tcpdump-and-cdp-packets-a626364d5a2f | |
tcpdump -nn -v -i eth0 -s 1500 -c 1 'ether[20:2] == 0x2000' |
#!/usr/bin/env bash | |
help_string="cat or diff file if content has changed from last run" | |
FILE=$1 | |
ME=$(basename $0) | |
if [ -z "$FILE" ]; then | |
echo "USAGE: $ME <resultfile.txt>" | |
echo "EXAMPLE: ifdiff.sh /tmp/changing-file.txt - cat file when it was changed from previous run" |
#!/usr/bin/env python | |
import time | |
import signal | |
import sys | |
import datetime | |
import inspect | |
def signalhandler (signum, frame): |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
### RUNNING: | |
#certbot certonly -d host.domain.tld --agree-tos --manual --preferred-challenges=dns --manual-auth-hook /root/certbot-hook-dns-auth.sh --manual-public-ip-logging-ok | |
HOST="_acme-challenge" | |
DYNZONE="SET_YOURDOMAIN_NAME" | |
if [ -z "$CERTBOT_DOMAIN" ] || [ -z "$CERTBOT_VALIDATION" ] || [ -z "$DYNZONE" ] | |
then |
redPin = 2 | |
greenPin = 1 | |
bluePin = 4 | |
pwm.setup(redPin,500,0) | |
pwm.setup(greenPin,500,0) | |
pwm.setup(bluePin,500,0) | |
pwm.start(redPin) | |
pwm.start(greenPin) |
-- nodeMCU specific | |
ws2812.init() | |
-- 4 LEDS, 3 bytes per LED | |
buffer = ws2812.newBuffer(4, 3) | |
green,red,blue = 255,64,192 | |
buffer:fill(green,red,blue) | |
function brightness (x, max) | |
return math.floor((math.floor((x * max) / 100)*2) + 1)/2 | |
end |
/* | |
* ---------------------------------------------------------------------------- | |
* "THE BEER-WARE LICENSE" (Revision 42): | |
* github.com/mrizvic wrote this file. As long as you retain this notice you | |
* can do whatever you want with this stuff. If we meet some day, and you think | |
* this stuff is worth it, you can buy me a beer in return. M.Rizvic | |
* ---------------------------------------------------------------------------- | |
## This function will pass incoming message to multiple outputs based on following conditions: |
#!/usr/bin/env bash | |
ME=$(basename $0) | |
WORKFILE="/tmp/$ME.$$" | |
if [ ! -z "$MAILTO" ]; then | |
RCPT=$MAILTO | |
else | |
RCPT=$1 | |
fi |
#!/usr/bin/env bash | |
WORKFILE=/tmp/myreport.out | |
cat <<EOF > $WORKFILE | |
From: username <[email protected]> | |
To: [email protected] | |
Subject: your html report | |
Content-Type: text/html; charset="us-ascii" |