The Domain Name System (DNS) protocol is an important part of the web's infrastructure, serving as the Internet's phone book: every time you visit a website, your computer performs a DNS lookup. Complex pages often require multiple DNS lookups before they start loading, so your computer may be performing hundreds of lookups a day.
This file contains hidden or 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
from re import ( | |
sub as regex_sub, | |
match as regex_match) | |
from binascii import a2b_hex as ascii_hex_to_binary | |
def asciiHexToBuffer(inbuf, | |
skip_bin_encode=False, | |
is_xxd=False, | |
is_od=False, | |
is_tcpdump=False, |
This file contains hidden or 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
""" | |
Written by Brendan O'Connor, [email protected], www.anyall.org | |
* Originally written Aug. 2005 | |
* Posted to gist.github.com/16173 on Oct. 2008 | |
Copyright (c) 2003-2006 Open Source Applications Foundation | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at |
This file contains hidden or 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
#!/bin/bash | |
# Print a list of all USB devices in Linux along with their | |
# manufacturer, product name and USB version (i.e. USBv2, USBv3) | |
# Set DEBUG to any value to enable printing of each command | |
# in case you get weird output | |
DEBUG="" | |
lsusb | while read line | |
do |
This file contains hidden or 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
# | |
# Useful function for outputting to structured files without any work - AG | |
# | |
def to_file(dest, obj, csv_fields=None, uniq=True, filter_blanks=True, silent=False): | |
""" | |
Dump to a file based on extension | |
If .json, do a standard dump() to the file | |
If .csv, do a CSV with column headers | |
If .lst, do one str/unicode per-line | |
""" |
This file contains hidden or 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 python | |
""" | |
Copyright 2018 [email protected] | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. |
This file contains hidden or 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
<QueryList> | |
<Query Id="0" Path="Security"> | |
<Select Path="Security"> | |
*[EventData[Data[@Name='ObjectName'] and (Data='C:\Users\Public\Documents\new-login-information.txt')]] | |
and | |
*[System[(EventID='4663')]] | |
</Select> | |
</Query> | |
</QueryList> |
This file contains hidden or 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
#define ROOT C:\Program Files\nxlog | |
define ROOT C:\Program Files (x86)\nxlog | |
Moduledir %ROOT%\modules | |
CacheDir %ROOT%\data | |
Pidfile %ROOT%\data\nxlog.pid | |
SpoolDir %ROOT%\data | |
LogFile %ROOT%\data\nxlog.log | |
<Extension _json> |
This file contains hidden or 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
#define ROOT C:\Program Files\nxlog | |
define ROOT C:\Program Files (x86)\nxlog | |
Moduledir %ROOT%\modules | |
CacheDir %ROOT%\data | |
Pidfile %ROOT%\data\nxlog.pid | |
SpoolDir %ROOT%\data | |
LogFile %ROOT%\data\nxlog.log | |
<Extension _json> |
This file contains hidden or 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
filter { | |
if "winlog" in [tags] and [SourceName] == "wineventlog" { | |
# Begin translate block - this adds a new field to enrich the event with a description based on the event_id value | |
translate { | |
field => "EventID" | |
destination => "EventDesc" | |
override => true | |
fallback => "no match" | |
# https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/Default.aspx | |
# Whip it into shape with sed/awk or use Python (4-5 lines cleans it up) |
OlderNewer