This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
EMAIL="you@example.com" | |
GS_HOSTNAME="your-grandstream-hostname" | |
STATUS_FILE='/tmp/.voip_ip_stat' | |
touch $STATUS_FILE | |
timeout 3 bash -c "printf '@' | telnet -e \@ $GS_HOSTNAME 22" 2>&1 >/dev/null | |
host_alive=$? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
THRESH_DAYS="7" | |
EMAIL="" | |
rm -f /home/jobs/scripts/pkiaudit.tmp | |
/etc/nopehq-configs/pki/tools/valid_audit.sh -s -t $THRESH_DAYS -i /etc/nopehq-configs/pki/tools/audit.ignore -d /etc/nopehq-configs/dns/nopeHQ-lan.hosts >/home/jobs/scripts/pkiaudit.tmp | |
NUM_WARNS=$(cat /home/jobs/scripts/pkiaudit.tmp | wc -l) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You can adjust the maximum throuhput limits (in mbits) here | |
BW_MAX_RATE=500mbit | |
BW_BURST_RATE=560mbit | |
IFACE=ens3 | |
# Local/remote paths | |
B2_SOURCE_PATH="/local/path/to/backupdir" | |
B2_DEST_BUCKET="b2://your-bucket-name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import hashlib | |
class CardHasher(): | |
def __init__(self, **kwargs): | |
if 'alg' in kwargs: | |
self.hasher = kwargs['alg'] | |
else: | |
self.hasher = hashlib.sha256 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 0 7 1-31/2 * * bash /home/charlton/scripts/cal.sh >/dev/null 2>&1 | |
EMAIL='' | |
HOST="$(cat /etc/hostname)" | |
echo " | |
Today in history: | |
`calendar -f /home/charlton/.calendar/calendar` | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// step (1) register for the free premium trial | |
// step (2) create a new team using the participants list of one of the default channels | |
// step (3) run this script | |
package main | |
import ( | |
"fmt" | |
"github.com/nlopes/slack" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Absurdly ridiculous random password sheet generator | |
// For use at https://www.rempe.us/diceware/#eff | |
function genPass(numWords) { | |
var randChars = "@%^*().?:;+=-_"; | |
var gen = getWords(numWords, 5); | |
var passwd = []; | |
for (var i = gen.length - 1; i != -1; i--) { | |
var goodness = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import urllib2 | |
import urllib | |
import json | |
CONFIG = { | |
'CLIENT_API_KEY': "", | |
'SERVER_API_KEY': "", | |
'DEFAULT_TOPICS': ["all", "some_topic_here"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://cybertalents.com/competitions/quals-saudi-oman-national-cyber-security-ctf-2019/maria/ | |
// 🂁 ctrezevant@sdf ~ $ time go run ctf.go | |
// go run ctf.go 1.17s user 0.45s system 48% cpu 3.341 total | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"net/http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import requests | |
import os, time | |
def get_token(): | |
url = 'https://app2.sli.do/api/v0.5/events/5a4dcc05-4c5c-41be-9ce1-0dd1c4dc77c4/auth' | |
headers = { | |
'origin': 'https://app2.sli.do', | |
'accept-encoding': 'gzip, deflate, br', | |
'accept-language': 'en-US,en;q=0.9', |