Skip to content

Instantly share code, notes, and snippets.

View sdstrowes's full-sized avatar

Stephen Strowes sdstrowes

View GitHub Profile
This file has been truncated, but you can view the full file.
$ bgpdump -m rib.20230919.0000.bz2 | grep ' 54113|' | awk -F\| '{printf("%22s %22s %s\n", $4, $6, $7)}' | sort -k1,1n | uniq
2023-10-04 14:24:25 [info] logging to syslog
2a00:1ca8:2a::e0 2606:2cc0::/46 202365 50673 174 54113
2a00:1ca8:2a::e0 2606:2cc0::/48 202365 50673 174 54113
2a00:1ca8:2a::e0 2a04:4e40::/48 202365 6939 9957 9957 9957 9957 9957 9957 9957 9957 9957 54113
2a00:1ca8:2a::e0 2a04:4e41::/32 202365 6939 4637 54113
2a00:1ca8:2a::e0 2a04:4e42::/32 202365 50673 174 54113
2a00:1ca8:2a::e0 2a04:4e42::/36 202365 6939 4637 54113
2a00:1ca8:2a::e0 2a04:4e42::/48 202365 50673 174 54113
2a00:1ca8:2a::e0 2a04:4e47::/48 202365 50673 174 54113
@sdstrowes
sdstrowes / .block
Created October 6, 2022 15:34 — forked from vasturiano/.block
Hilbert Map of IPv4 address space
license: mit
with pdns_google as (
select af, prb_id, p.data google, response_time response_time_google
from `ripencc-atlas.measurements.dns_decoded`, unnest(wire_message.payload) p
where date(start_time) = "2022-08-02"
and (
# ipv4
msm_id = 43148525 or
msm_id = 43148540 or
msm_id = 43148581 or
msm_id = 43148589 or
@sdstrowes
sdstrowes / get-stats.sh
Created February 3, 2022 16:04
RIR extended stats fetcher
#!/usr/bin/env bash
date=date
zcat=zcat
if [[ "$OSTYPE" == "darwin"* ]]; then
date=gdate
zcat=gzcat
fi
while getopts "hd:" arg; do
@sdstrowes
sdstrowes / gist:0f54d34dcc093b9c51375989247f068d
Last active September 23, 2022 17:41
starlink resources
ripencc|US|ipv4|91.102.180.0|1024|20061101|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
ripencc|US|ipv4|145.224.64.0|16384|19930506|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
ripencc|US|ipv4|162.43.192.0|1024|19920721|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
ripencc|US|ipv4|169.155.224.0|8192|19950103|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
ripencc|US|ipv4|176.116.124.0|512|20120507|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
ripencc|US|ipv4|188.92.248.0|2048|20090505|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
ripencc|US|ipv4|188.95.144.0|512|20180706|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
ripencc|US|ipv4|216.128.0.0|8192|20050928|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
ripencc|US|ipv4|217.65.136.0|2048|20001102|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
ripencc|US|ipv6|2a0d:3340::|29|20200728|allocated|aa89e9d5-1981-4585-8a77-831456d685f9
@sdstrowes
sdstrowes / as32934.txt
Created October 4, 2021 18:32
AS32934
2620:0:1c00::/40
2a03:2880::/32
2a03:2880::/36
2a03:2880:1000::/36
2a03:2880:2000::/36
2a03:2880:3000::/36
2a03:2880:f001::/48
2a03:2880:f003::/48
2a03:2880:f004::/48
2a03:2880:f005::/48
with matching_traceroutes as (
select start_time, prb_id, msm_id, hops
from ripencc-atlas.yesterday.traceroute, unnest(hops) h
where net.ip_trunc(h.hop_addr_bytes, 8) = net.ip_from_string("10.0.0.0") and af = 4 and hop > 4
)
-- ANY_VALUE() and TO_JSON_STRING() are magic to get back to the
-- original record, since I unpacked the hops in the statement above
select ANY_VALUE(matching_traceroutes).*
from matching_traceroutes
with rtts as
(
select prb_id, af, hop, rtt
from ripencc-atlas.yesterday.traceroute, unnest(hops) h
where hop <= 2 and err is null and hop_addr is not null
),
agg_rtts as
(
with quants as (
@sdstrowes
sdstrowes / Samsung.ppd
Created April 12, 2021 20:46
samsung ppd
*PPD-Adobe: "4.3"
*% ===============================================
*% Disclaimer: The above statement indicates
*% that this PPD was written using the Adobe PPD
*% File Format Specification 4.3, but does not
*% intend to imply approval and acceptance by
*% Adobe Systems, Inc.
*% ===============================================
*%
*% CopyRight (c) 2009 by