Skip to content

Instantly share code, notes, and snippets.

View sirkirby's full-sized avatar
:octocat:

Chris Kirby sirkirby

:octocat:
View GitHub Profile
@sirkirby
sirkirby / migrate-adlists-filters.py
Created December 17, 2024 20:08
Migrate Pi-Hole adlist to Adguard DNS Blocklist Filters yaml
import json
import yaml
import sys
from datetime import datetime, timezone
def convert_adlists(adlists_json):
"""Convert Pi-hole adlists to AdGuard Home filters format."""
try:
adlists_data = json.loads(adlists_json)
except json.JSONDecodeError:
@sirkirby
sirkirby / GetFirewallRule.bru
Created September 20, 2024 19:01
Bruno UDM Network API get firewall rule
meta {
name: GetFirewallRule
type: http
seq: 3
}
get {
url: https://{{udm-ip}}/proxy/network/api/s/default/rest/firewallrule/{{rule-id}}
body: none
auth: none
@sirkirby
sirkirby / GetTrafficRule.bru
Created September 20, 2024 18:59
Bruno UDM Network API get traffic rule
meta {
name: GetTrafficRule
type: http
seq: 6
}
get {
url: https://{{udm-ip}}/proxy/network/v2/api/site/default/trafficrule/{{rule-id}}
body: none
auth: none
@sirkirby
sirkirby / GetTrafficRules.bru
Created September 20, 2024 16:35
UDM Network API get traffic rules
meta {
name: GetTrafficRules
type: http
seq: 4
}
get {
url: https://{{udm-ip}}/proxy/network/v2/api/site/default/trafficrules
body: none
auth: none
@sirkirby
sirkirby / GetFirewallRules.bru
Created September 20, 2024 16:32
UDM Network API get firewall rules
meta {
name: GetFirewallRules
type: http
seq: 3
}
get {
url: https://{{udm-ip}}/proxy/network/api/s/default/rest/firewallrule
body: none
auth: none
@sirkirby
sirkirby / Login.bru
Created September 20, 2024 16:09
UDM Login request
meta {
name: Login
type: http
seq: 2
}
post {
url: https://{{udm-ip}}/api/auth/login
body: json
auth: none
@sirkirby
sirkirby / plex-fstab
Created July 26, 2024 17:09
mount NFS drives in /etc/fstab file on Ubuntu
# mount synology media shares to local directories
10.0.0.10:/volume1/video/Movies /mnt/video nfs defaults 0 0
10.0.0.10:/volume1/music /mnt/audio nfs defaults 0 0
10.0.0.10:/volume1/photo /mnt/photos nfs defaults 0 0
10.0.0.10:/volume1/video/Gaming /mnt/gaming nfs defaults 0 0
10.0.0.10:/volume1/video/TV /mnt/tv nfs defaults 0 0
@sirkirby
sirkirby / public-dns-resolvers.txt
Last active July 26, 2024 13:43
Know public DNS resolvers
// Known public DNS and DoH resolvers
// See https://dnsprivacy.org/public_resolvers/
// Ports 54, 853, and 443 (DoH)
// IPv4
1.0.0.1
1.1.1.1
4.2.2.1
4.2.2.2
@sirkirby
sirkirby / dig-test.txt
Created February 22, 2024 14:58
dig test
; <<>> DiG 9.10.6 <<>> @10.10.10.100 github.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19540
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
@sirkirby
sirkirby / nslookup-text.txt
Created February 22, 2024 14:57
nslookup text
nslookup
nslookup openai.com 10.10.10.100
Server: 10.10.10.100
Address: 10.10.10.100#53
Non-authoritative answer:
Name: openai.com
Address: 13.107.246.51
Name: openai.com