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 json | |
import re | |
with open("somefile.json", 'r', encoding='utf-8) as f: | |
s = f.read() | |
# Original code here by tobias_k: https://stackoverflow.com/questions/18514910/how-do-i-automatically-fix-an-invalid-json-string | |
while True: | |
try: |
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 asyncio | |
# Async operation definition remains the same | |
async def async_operation(): | |
print("Starting async operation") | |
await asyncio.sleep(1) | |
print("Async operation completed") |
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 | |
set -euo pipefail | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi |
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
GWX 3.0 | |
Once you created a symlink with no space in its name, you can install GWX using its installer, pointing to that symlink instead of the default silent hunter 3 install location (which contains spaces, and other characters nobody should use) | |
If you just install GWX, it will start in 4:3 resolution ; to make it work in proper 1920x1080 resolution, i tried multiple widescreen "mods" (dll + GUI) ; the only one that worked and gave me a UI that i like is ahnenerbe's one. | |
0. downloads | |
- download "Ahnenerbe WideGui 1920 x 1080 Final" from | |
http://www.subsim.com/radioroom/showthread.php?t=215433 | |
- download GWX from |
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 com.helger.schematron.ISchematronResource; | |
import com.helger.schematron.svrl.SVRLFailedAssertAndReport; | |
import com.helger.schematron.xslt.SchematronResourceSCH; | |
import javax.xml.transform.stream.StreamSource; | |
import java.io.File; | |
import java.util.List; | |
public class SchematronValidator { |
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
<xs:schema xmlns="http://csrc.nist.gov/ns/oscal/1.0" | |
xmlns:m="http://csrc.nist.gov/ns/oscal/metaschema/1.0" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
elementFormDefault="qualified" | |
targetNamespace="http://csrc.nist.gov/ns/oscal/1.0" | |
version="1.1.0"> | |
<xs:annotation> | |
<xs:appinfo> | |
<m:schema-name>OSCAL System Security Plan (SSP) Model</m:schema-name> |
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
# Python 3.6+ | |
# pip(3) install requests | |
import requests | |
# Standard headers | |
HEADERS_AUTH = {"Content-Type": "application/x-www-form-urlencoded"} | |
HEADERS = {"Content-Type": "application/json"} | |
client_id = "SERVICE_ACCOUNT_CLIENT_ID" | |
client_secret = "SERVICE_ACCOUNT_CLIENT_SECRET" |
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/env python3 | |
import sys | |
from lxml import etree | |
from pathlib import Path | |
import random | |
stig_folder = "./tests/test_data" |
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
[ | |
{ | |
"ID": "ac-1", | |
"TITLE": "Access Control Policy and Procedures", | |
"Confidentiality": "Low", | |
"Integrity": "Low", | |
"Availability": "Low" | |
}, | |
{ | |
"ID": "ac-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
## AlienVault CLI | |
This CLI is provided to ingest pulses from [AlienVault](https://otx.alienvault.com/). The RegScale CLI tool will convert this data feed into threats for use within the RegScale platform. It is commonly used to support Threat-Hunting and Threat-Based Risk Modeling for RegScale customers. | |
### Init.yaml Configuration | |
There is one required variable that will configure the AlienVault integration. The AlienVault user API key will allow pulses to pull from all subscribed feeds within AlienVault and into the RegScale platform. | |
- `otx` - enter AlienVault API key here |
NewerOlder