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
#include <Python.h> // Must be first | |
#include <vector> | |
#include <stdexcept> | |
#include "PyUtils.h" | |
using namespace std; | |
// ===== | |
// LISTS | |
// ===== |
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/python | |
import pefile | |
import sys | |
''' | |
Test the section characteristics to see if the section is executable. Check for flags: | |
* 0x00000020 = Section contains code | |
* 0x20000000 = Section is executable | |
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
#!/bin/bash | |
# Modified Pi-hole script to generate a dnsmasq file | |
# Intended for EdgeOS/EdgeMax from Ubuquiti Networks https://www.ubnt.com/ | |
# original : https://github.com/jacobsalmela/pi-hole/blob/master/gravity-adv.sh | |
# original : https://gist.github.com/OnlyInAmerica/75e200886e02e7562fa1 | |
# inspiration: https://help.ubnt.com/hc/en-us/articles/205223340-EdgeRouter-Ad-blocking-content-filtering-using-EdgeRouter | |
# Be sure to put this file in /config/user-data/ | |
# Symlink for cron updates: | |
# ln -s /config/user-data/edgeos_adblock.sh /etc/cron.weekly/edgeos_adblock |
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/python | |
import os, sys, hashlib, shutil | |
sha256 = lambda data: hashlib.sha256(data).hexdigest() | |
def searchAndCollect(src, dest): | |
print "Searching %s for .exe's, saving to %s" % (src, dest) | |
for dirpath, dirnames, filenames in os.walk(src): | |
if src in dirnames: |
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/python3 | |
import os | |
import zlib | |
import pickle | |
import numpy as np | |
import unittest | |
P_B = 227 | |
P_M = 1000005 |
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/python | |
import math, string, sys | |
def range_bytes (): return range(256) | |
def range_printable(): return (ord(c) for c in string.printable) | |
def H(data, iterator=range_bytes): | |
if not data: | |
return 0 | |
entropy = 0 |
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
import math | |
ordinal = lambda n: "%d%s" % (n,"tsnrhtdd"[(math.floor(n/10)%10!=1)*(n%10<4)*n%10::4]) |
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
# Input example: 8249CEB658C71D41D7B734449629AB97 | |
# Output example: 82:49:CE:B6:58:C7:1D:41:D7:B7:34:44:96:29:AB:97 | |
reformat = lambda x: ":".join([x[i:i+2] for i in range(0, len(x), 2)]) |
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
#include <string> | |
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
void printProgBar( int percent ); | |
int main(int argc, char* argv[]) { | |
int N = 100; | |
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/python3 | |
import os | |
import sys | |
import glob | |
import codecs | |
import random | |
cleanup = lambda x: x.split("/")[0] if "/" in x else x # Some hunspell entries have slashes in the second to last character. |
NewerOlder