Skip to content

Instantly share code, notes, and snippets.

View FHRNet's full-sized avatar

Filip Hruška FHRNet

View GitHub Profile
@FHRNet
FHRNet / watcher.py
Created November 11, 2017 18:01
Script to check if page has changed and send email
import urllib2
import hashlib
import sendgrid
# Open hash file
hashfile = open('watcher.latest.txt', 'r+')
hashfile.seek(0)
# Retrieve page
data = urllib2.urlopen('http://your/url', timeout=3).read()
@FHRNet
FHRNet / dhcpd.conf
Created March 10, 2019 00:27
dhcp for routed VMs
option domain-name-servers 9.9.9.10 8.8.8.8;
option subnet-mask 255.255.255.255;
option routers 172.16.0.1;
shared-network "net1" {
subnet 172.16.0.1 netmask 255.255.255.255 {
}
subnet 192.168.0.55 netmask 255.255.255.255 {
authoritative;
allow unknown-clients;
range 192.168.0.55;
@FHRNet
FHRNet / dig_ANY.sh
Created June 5, 2019 16:15
DNS Dig ANY
#!/bin/bash
#
# Tired of the nonsensical "ANY" deprecation pushed and forced by CloudFlare?
# Here's a tool to simulate ANY queries.
query_types=(SOA NS A AAAA MX CAA TXT SRV HINFO PTR RRSIG DNSKEY DS NSEC NSEC3 NAPTR)
if [[ -z ${1} ]]; then
echo "Usage: ${0} <domainname> [recursor]"
exit 1
@FHRNet
FHRNet / lambda_function.py
Created January 4, 2020 20:42
HetrixTools - Make Twilio calls through webhooks with AWS Lambda
#
# This microservice links HetrixTools and Twilio together through webhooks.
# If HetrixTools detects downtime, this microservice is called, which calls your phone/SIP number
# and announces which monitor detected an issue using TTS.
#
# GET Parameters:
# - token = Must match SecretKey
# - repeat = How many times should the message be repeated (optional, default 2)
# - to = Which number / SIP destination to call
#
@FHRNet
FHRNet / hacker.md
Created February 13, 2020 17:35
Signs your son is a computer hacker

As a modern parent, I try to be as involved as possible in the lives of my six children. I attend their teen parties with them to ensure no drinking or alcohol is on the premises. I keep a fatherly eye on the CDs they listen to and the shows they watch. My children have never failed to make me proud.

As parents do we decided to aid with our childrens education by purchasing a computer. The kids had a lot of fun using the handful of application programs we'd bought, such as Adobe's Photoshop and Microsoft's Word, and my wife and I were happy we had made the decision

Our son Terence was most entranced by the device, and became quite a pro at surfing the net. But he began to spend whole days on the machine, I became concerned, My wife advised me not to worry it was only a passing phase. Hoever our youngest daughter,Sarah, one night to blurt out: "Terence is a hacker!"

I was shocked. A computer hacker in my own house! I began to monitor my son's habits, was Sarah just telling tales!!.

After some research int