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
import json | |
import requests | |
import datetime | |
import io | |
#REQUIRED | |
# Authenticate to Satori for a bearer token | |
satori_account_id = 'NEED_VALUE' | |
satori_serviceaccount_id = 'NEED_VALUE' | |
satori_serviceaccount_key = 'NEED_VALUE' |
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
import json | |
import requests | |
import datetime | |
import io | |
import boto3 | |
# Satori Authentication | |
# see https://app.satoricyber.com/docs/api for auth info | |
satori_serviceaccount_id = "MUST_FILL_IN" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
function countAllWordsAndImagesInFolder(){ | |
var googleDriveFolder = DriveApp.getFolderById("CHANGE_THIS_TO_YOUR_GOOGLE_DRIVE_FOLDER_ID"); | |
var filesIterator = (googleDriveFolder.getFiles()); | |
var file; | |
var mimetype; | |
var masterWordCount = 0; | |
var masterImageCount = 0; | |
while(filesIterator.hasNext()) //run loop while there is an new available file |
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
import random, string | |
# This script will spit out three sql files in the current working dir: | |
# create_schema_and_tables.sql | |
# create_users_and_roles.sql | |
# drop_everything.sql | |
########################################################## |
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
import psycopg2 | |
import time | |
# select one or more postgres schemas using the following format | |
TARGET_SCHEMAS = ('public', 'second_schema', 'third_etc') | |
# how many rows in each select statement | |
ROWS_TO_PULL = '1200' | |
# connection info |
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
# pip install redshift_connector | |
import redshift_connector | |
import time | |
# THIS SCRIPT will run queries on all tables in the selected schemas | |
# This will in turn trigger Satori's Data Inventory features | |
# select one or more redshift schemas using this format | |
TARGET_SCHEMAS = ('public', 'another_schema', 'a_third_schema') |
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
# Please read the full documentation for Satori access to AWS S3 here: | |
# https://satoricyber.com/docs/datastores/s3/ | |
# this example assumes you have already created a Satori Datastore for your AWS S3 access | |
# pip install boto3 and pandas for this example to work | |
import os | |
import boto3 | |
import json | |
import pandas as pd |
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
# This script generates a terraform config file specific to | |
# bulk-loading user information into Satori. | |
# | |
# Satori: https://satoricyber.com/docs/directory/directory/ | |
# Terraform: https://registry.terraform.io/providers/SatoriCyber/satori/latest/docs | |
#BEGIN config | |
#enter satori account information, url is currently correct for satori platform | |
my_satori_account = "NEED VALUE" |
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
import json | |
import requests | |
# | |
# This scripts requires populated Inventory in Satori already. | |
# There are other scripts to automate inventory population in Satori | |
# Reminder: Inventory != Classifiers | |
# | |
# |