Skip to content

Instantly share code, notes, and snippets.

@m0rb
Created January 2, 2022 23:02
Show Gist options
  • Save m0rb/3de2bd4c175c63e66d0c1dd2e26a8964 to your computer and use it in GitHub Desktop.
Save m0rb/3de2bd4c175c63e66d0c1dd2e26a8964 to your computer and use it in GitHub Desktop.
quick doh query dumper
#!/usr/bin/env perl
# pipe me a stray cat
use strict;
use warnings;
use Net::DNS::Packet;
use MIME::Base64 qw(decode_base64);
while (<>) {
chomp;
my $s = $_;$s =~ s/(^.*\?.*=| HTTP.*)//;
my $q = decode_base64($s);
print "$_\n".Net::DNS::Packet->new(\$q)->print;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment