Skip to content

Instantly share code, notes, and snippets.

View malexmave's full-sized avatar

Max Maass malexmave

View GitHub Profile
@malexmave
malexmave / ntstatus.csv
Last active November 16, 2023 15:04
There are a bunch of versions of the list of NTSTATUS codes online, but many of them are invalid CSVs. This one is cleaned so that it is accepted by Azure Sentinel for import as a Watchlist.
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Return value;Return code;Description
0x00000000;STATUS_SUCCESS;The operation completed successfully.
0x00000000;STATUS_WAIT_0;The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
0x00000001;STATUS_WAIT_1;The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
0x00000002;STATUS_WAIT_2;The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
0x00000003;STATUS_WAIT_3;The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
0x0000003F;STATUS_WAIT_63;The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
0x00000080;STATUS_ABANDONED;The caller attempted to wait for a mutex that has been abandoned.
0x00000080;STATUS_ABANDONED_WAIT_0;The call
@malexmave
malexmave / keybase.md
Created March 22, 2014 14:42
keybase.md

Keybase proof

I hereby claim:

  • I am malexmave on github.
  • I am malexmave (https://keybase.io/malexmave) on keybase.
  • I have a public key whose fingerprint is 84C4 8097 A3AF 7D55 189A 77AC 169F 9624 3408 825E

To claim this, I am signing this object:

@malexmave
malexmave / gist:9660246
Created March 20, 2014 09:33
Dynamic datatype generation
# A few notes:
# data.structure.STRUCT contains the definitions as described in the blog post
# data.structure.SQL_TO_PY_TYPE contains a dictionary mapping SQL to python data types
# data.structure.CamelCase() is a function converting strings_with_underscore to stringsInCamelcase
# The checkRep-Function is later used to verify that the data type is sane
from data import structure
@malexmave
malexmave / Demo Code
Created March 18, 2014 19:50
secure-smtpd exceptions
import asyncore
from secure_smtpd import ProxyServer
class MyProxyServer(ProxyServer):
def process_message(self, peer, mailfrom, rcpttos, data):
ProxyServer.process_message(self, peer, mailfrom, rcpttos, data)
@malexmave
malexmave / gist:9254016
Created February 27, 2014 16:47
tables.sql for using sqlite with WikiDB Mediawiki extension
-- ---------------------------------------------------------------------------------
-- TABLE DEFINITIONS FOR THE WikiDB EXTENSION.
-- $Rev: 776 $
-- ---------------------------------------------------------------------------------
-- You are strongly recommended to use the supplied install/update scripts rather
-- than running this code directly.
--
-- /*$wgDBprefix*/ should be replaced with the DB prefix you are using for
-- your MediaWiki installation (if relevant).
-- This will be done automatically if you use the install/update scripts.
@malexmave
malexmave / gist:6980277
Created October 14, 2013 18:56
gpgit behaviour
$ cat t
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
test
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQJ8BAEBCgBmBQJSXDxtXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
@malexmave
malexmave / gist:6484662
Created September 8, 2013 13:19
Gibberbot exception
E/AndroidRuntime(13961): FATAL EXCEPTION: pool-2-thread-1
E/AndroidRuntime(13961): android.database.sqlite.SQLiteException: Expression tree is too large (maximum depth 1000) (code 1): , while compiling: DELETE FROM contacts WHERE username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=? AND username!=
@malexmave
malexmave / randomart.html
Last active July 18, 2023 06:15
"Drunk Bishop" RandomArt algorithm (from SSH), implemented as Javascript. Only demo code here, but can be trivially changed to give some return value to do something with the randomart.
<!-- I was recently asked what license this code is under. Since it is fairly trivial code,
I don't really feel it "deserves" a "real" license, so I am hereby placing it in the public domain.
In countries where this is not posible, I am placing it under Creative Commons CC0
(https://creativecommons.org/publicdomain/zero/1.0/), which is basically just a more formal way of
putting it in the public domain for people who like to be sure.
If you want to credit me anyway, that is of course fine with me :) -->
<html>
<body>
<div id="renderDiv" style='font-family:"Lucida Console", Monaco, monospace' />
<script type="text/javascript">