Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Jarrett tjarrettveracode

View GitHub Profile
@tjarrettveracode
tjarrettveracode / pre-request.js
Last active May 3, 2022
This gist is deprecated. Please use the pre-request script found at https://github.com/veracode/veracode-postman.
View pre-request.js
var url = require('url');
const id = 'YOUR_VERACODE_API_KEY_ID';
const key = 'YOUR_VERACODE_API_KEY_SECRET';
const authorizationScheme = 'VERACODE-HMAC-SHA-256';
const requestVersion = "vcode_request_version_1";
const nonceSize = 16;
function computeHashHex(message, key_hex) {
@tjarrettveracode
tjarrettveracode / createcredentials.py
Created Oct 23, 2020
Simple Python script to create a Veracode credentials file. Useful in environments like Pythonista.
View createcredentials.py
import os
def create_folder(directory):
try:
if not os.path.exists(directory):
os.makedirs(directory)
except OSError:
print('Error: Creating directory. ' + directory)
#edit this to reflect your local Pythonista directory. You can try the following in a python console
View securitylabs.json
{
"MRData": {
"xmlns": "http:\/\/ergast.com\/mrd\/1.4",
"series": "f1",
"url": "http://ergast.com/api/f1/2018/circuits.json",
"limit": "30",
"offset": "0",
"total": "21",
"CircuitTable": {
"season": "2018",