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
| param ($version) | |
| $ErrorActionPreference = "Stop" | |
| $prev_location = $pwd | |
| if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { | |
| Start-Process PowerShell -Verb RunAs "-NoProfile -ExecutionPolicy Bypass -Command `"cd '$prev_location'; & '$PSCommandPath' $version;`""; | |
| exit; | |
| } | |
| # setup done |
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
| from openpyxl import Workbook | |
| from pathlib import Path | |
| import csv, sys | |
| expdir = Path(sys.argv[1]) | |
| datfile = expdir / 'Component.dat' | |
| __datalen__ = 103 | |
| wb = Workbook() | |
| ws = wb.active |
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
| #! /usr/bin/env python3 | |
| def round_volts(num, precision=4): | |
| return round(to_float(num), precision) # -- too slow | |
| # cut = precision+2 | |
| # if num[0] == '-': | |
| # cut += 1 | |
| # return num[:cut] | |
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
| from scapy.all import * | |
| paks = rdpcap('sample.pcap') | |
| db = {} | |
| def check_ttl(packet): | |
| new_ttl = packet.ttl | |
| src = packet.src |
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
| #! /usr/local/bin/bash | |
| if [[ -z "$1" || -z "$2" ]]; then | |
| exit 1 | |
| fi | |
| ##### PARAMETERS ##### | |
| METRIC="$1" | |
| URL="$2" | |
| STATSURL="${URL}?auto" | |
| # | |
| CACHE_TTL="55" |