Created
January 2, 2022 23:02
-
-
Save m0rb/3de2bd4c175c63e66d0c1dd2e26a8964 to your computer and use it in GitHub Desktop.
quick doh query dumper
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 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