I hereby claim:
- I am wietze on github.
- I am wietze (https://keybase.io/wietze) on keybase.
- I have a public key ASDdJkS4koCaqAzWQlpS5JHjCMcnWaEvpG2pXUb3vjP8DAo
To claim this, I am signing this object:
| \usepackage{hyperref} | |
| \usepackage{xstring} | |
| \DeclareRobustCommand{\tid}[1]{\StrSubstitute{#1}{.}{/}[\temp]% | |
| \href{https://attack.mitre.org/techniques/\temp/}{#1}} | |
| % \tid{T1234} returns 'T1234' with a hyperlink to its MITRE ATT&CK page | |
| \DeclareRobustCommand{\tidtext}[1]{\StrSubstitute{#1}{.}{/}[\temp]% | |
| \href{https://attack.mitre.org/techniques/\temp/}{#1}: \gettid{#1}} | |
| % \tidtext{T1234} returns 'T1234: Technique Name' with T1234 containing a hyperlink to its MITRE ATT&CK page |
| import requests | |
| MITRE_ATTACK_DATA = requests.get('https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json').json() | |
| TECHNIQUES = {technique['external_references'][0]['external_id']:technique['name'] for technique in MITRE_ATTACK_DATA['objects'] if technique['type'] == 'attack-pattern' and not technique.get('revoked')} | |
| def get_technique(tid): | |
| return TECHNIQUES[tid] if '.' not in tid else "{}: {}".format(TECHNIQUES[tid[:5]], TECHNIQUES[tid]) | |
| # Usage: |
| import requests | |
| ########## | |
| ### MITRE ATT&CK ONELINERS | |
| ### for constructing Python objects | |
| ### with all ATT&CK techniques in them | |
| ### using the latest MITRE ATT&CK data | |
| ########## | |
| # Get MITRE ATT&CK technique objects as list |
| python -c "import sys,ssl;print(ssl.get_server_certificate((sys.argv[1], sys.argv[2])))" $DOMAIN $PORT > output.pem | |
| # Example: | |
| # $ python -c "import sys,ssl;print ssl.get_server_certificate((sys.argv[1], sys.argv[2]))" google.com 443 > google.pem |
| ################################################################################ | |
| ### Simple PowerShell script that gets FilmOn stream URL based on channel id. | |
| ### A picker for some populare UK channels is provided. | |
| ### | |
| ### :: HOW TO RUN | |
| ### Run the following to watch FilmOn channel 14 (= BBC One) | |
| ### & ./filmon.ps1 14 | |
| ### Run the following to see the channel picker, and manually select the channel | |
| ### & ./filmon.ps1 | |
| ################################################################################ |
I hereby claim:
To claim this, I am signing this object:
| import os | |
| import time | |
| import datetime | |
| from dateutil.parser import parse | |
| from pytz import timezone | |
| import re | |
| import glob | |
| import socket | |
| from subprocess import call | |
| from feedgen.feed import FeedGenerator |