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
/* | |
Tiny Dataset Framework | |
Replaced by ES6 version (https://gist.github.com/bng44270/61fe2af9313ae750c53c639a178f5e2e) | |
Provide ablility to define and edit JSON objects | |
Requires: NewClass.js | |
Two Options: |
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
/* | |
Usage: | |
Determine employee has an employee type: | |
if (new GenericUserUtil().hasEmployeeType("employee-type")) { | |
//deny or grant access | |
} | |
Determine if employee is in a company: | |
if (new GenericUserUtil().isInCompany("company-sys-id")) { |
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
/* | |
Uses u_secure_catalog_def table | |
Fields: | |
cat_item : reference to sc_cat_item | |
grant_by : string (can be "user", "group", or "task") | |
user : reference to sys_user | |
group : reference to sys_user_group | |
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 re import sub as regex_sub | |
from sys import argv as arglist | |
class Arguments: | |
""" | |
Usage: | |
# Initialize to read in command arguments | |
args = Arguments() | |
""" |
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 requests | |
from arguments import Arguments | |
from sys import argv as command_arguments | |
arinjson = lambda x : requests.get("http://whois.arin.net/ui/query.do?queryinput={}".format(x),headers={"Accept":"application/json"},verify=False).json() | |
# print indented outline-style representation of dictionary object | |
def dictol(this_dictionary): | |
try: | |
prefix = this_dictionary['pf'] |
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 requests | |
from arguments import Arguments | |
from sys import argv as command_args | |
arinjson = lambda x : requests.get("http://whois.arin.net/ui/query.do?queryinput={}".format(x),headers={"Accept":"application/json"},verify=False).json() | |
ARGS = Arguments(command_args) | |
if not ARGS.Get('a'): | |
print "usage: asn2ip.py -a <ASN>" |
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
#Requires Python 3.6 | |
from arguments import Arguments | |
import requests | |
import tarfile | |
import io | |
import sys | |
def usage(): | |
print("usage: clamav_check.py -h <hash> -f <daily|main>") |
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
#Requires Python 3.6 | |
from arguments import Arguments | |
import requests | |
import tarfile | |
import io | |
import re | |
import sys | |
def usage(): |
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 re import sub as regex_sub | |
from os import path | |
class ConfigFile: | |
""" | |
Usage: | |
# Initialize object with no configuration file (must be configured with Read method) | |
conf = ConfigFile() | |
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
########################################################## | |
# | |
# ezdb.py - SQLite database functions | |
# | |
# NOTE: This only works with data of type text and varchar | |
# | |
# Import libraries | |
# from ezdb import TableDef, DatabaseDef | |
# | |
# Create a table object with fields: |