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
https://bugs.python.org/issue35172 -> https://github.com/python/cpython/issues/79353 | |
https://bugs.python.org/issue35173 -> https://github.com/python/cpython/issues/79354 | |
https://www.plurk.com/p/3g89qh2j4f |
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
From b322ecac9992c8bd8c3dfeaf2579a0b2b4b81336 Mon Sep 17 00:00:00 2001 | |
From: Ali Rizvi-Santiago <[email protected]> | |
Date: Sat, 28 May 2022 11:49:00 -0500 | |
Subject: [PATCH 1/2] saving my game prior to modifying the tree-sitter-c | |
grammar | |
100.0% src/ | |
diff --git a/src/builder.rs b/src/builder.rs | |
index 13908b0..f600032 100644 |
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
$ fuck gh's sorting algorithm and their decision of using the first filename as the gist uri... |
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
if __name__ == 'TELEFRAG': | |
import math, random, ptypes, office.storage | |
from ptypes import * | |
source = ptypes.provider.file(rp, 'rw') | |
source = ptypes.setsource(source) | |
state = random.Random() | |
## file | |
store = office.storage.File() |
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
diff --git a/misc/interface.py b/misc/interface.py | |
index 4a9504fe5..94b77514b 100644 | |
--- a/misc/interface.py | |
+++ b/misc/interface.py | |
@@ -6107,3 +6107,42 @@ class name(object): | |
logging.fatal(u"{:s}.netnode({:#x}{:s}) : Unable to restore the original name (\"{:s}\") for the netnode at {:#x} which is currently named \"{:s}\".".format('.'.join([__name__, cls.__name__]), identifier, '' if name is None else ", name=\"{:s}\"".format(name), internal.utils.string.escape(original, '"'), identifier, internal.utils.string.escape(temporary, '"'))) | |
logging.info(u"{:s}.netnode({:#x}{:s}) : The original name (\"{:s}\") is currently associated with the netnode at {:#x}.".format('.'.join([__name__, cls.__name__]), identifier, '' if name is None else ", name=\"{:s}\"".format(name), internal.utils.string.escape(original, '"'), internal.netnode.get(original))) | |
return | |
+ | |
+ @classmethod |
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
--- /dev/null 2023-02-27 00:26:22.135999836 +0000 | |
+++ /etc/pam.d/system-account- 2022-11-08 08:17:09.000000000 +0000 | |
@@ -0,0 +1,7 @@ | |
+# Begin /etc/pam.d/system-account | |
+# Updated by Ansible - 2022-11-08T08:17:09.196506 | |
+ | |
+account required pam_unix.so | |
+account required pam_tally2.so deny=3 onerr=fail audit even_deny_root unlock_time=900 root_unlock_time=300 | |
+ | |
+# End /etc/pam.d/system-account |
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
def indices(string, characters): | |
'''Return a generator that yields each index of the given `characters` found in `string`.''' | |
iterable = (string.find(character) for character in characters) | |
current, index = 0, min([index for index in iterable if 0 <= index] or [-1]) | |
while 0 <= index: | |
yield current + index | |
current, string = current + 1 + index, string[1 + index:] | |
iterable = [string.find(character) for character in characters] | |
index = min([index for index in iterable if 0 <= index] or [-1]) | |
return |
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
# gen_key returns privkey as bytes and pem | |
# load_key will read a key from some bytes (decrypting if a pass is provided), asking user for input, returning privkey as bytes and pem | |
# gen_certificate takes your private key as bytes and some keywords, returning a cert and pubkey | |
# load_certificate takes private key and cert as bytes, returning a cert and pubkey | |
# setup_ssl is just example code how to use those things | |
def gen_key(e=65537, bits=1024): | |
import cryptography.hazmat.primitives.asymmetric.rsa as chpar | |
import cryptography.hazmat.primitives.serialization as chps | |
import cryptography.hazmat.backends as chb |
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
class multicase(object): | |
""" | |
A lot of magic is in this class which allows one to define multiple cases | |
for a single function. | |
""" | |
CO_OPTIMIZED = 0x00001 | |
CO_NEWLOCALS = 0x00002 | |
CO_VARARGS = 0x00004 | |
CO_VARKEYWORDS = 0x00008 | |
CO_NESTED = 0x00010 |
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
F = idaapi.decompile(address) | |
def ctree_relexer(F, idabits=8 if idaapi.get_inf_structure().is_64bit() else 4): | |
iterable = (F.pseudocode[i].line for i in range(1 + F.hdrlines, F.pseudocode.size())) | |
items = ' '.join(iterable).split("\x01({:0{:d}s}".format('', 2 * idabits)) | |
line, = filter(None, items) | |
for m in re.finditer(r"\x01\(([0-9A-F]{{{:d}}})[\1\2]([^\1\2]+)".format(2 * idabits), line): | |
id, x = m.groups() | |
idx = int(id, 0x10) | |
if F.treeitems.size() <= idx: continue |
NewerOlder