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
Moved to https://github.com/dadatuputi/import_milstar |
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
# https://learn-powershell.net/2016/04/22/speedy-ping-using-powershell/ | |
# Scan the local network | |
$Hosts = 1..254 | foreach {"192.168.1.$_"} | |
$Tasks = $Hosts | foreach {(New-Object System.Net.NetworkInformation.Ping).SendPingAsync($_)} | |
[Threading.Tasks.Task]::WaitAll($Tasks) | |
#$Tasks.Result | |
# Scan the arp table for MAC addresses that are registered to the Pi Foundation | |
arp -a | select-string "b8-27-eb" |% { $_.ToString().Trim().Split(" ")[0] } |
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 | |
# findPi: | |
# Find all Pi's on the LAN | |
# Replace '10.1.0.0/21' below with your subnet and subnet mask | |
# | |
# Should have `net-tools` installed in Debian (apt install net-tools) | |
fping -a -r1 -g 192.168.1.1/24 &> /dev/null | |
arp -n | grep -i "B8-27-EB\|DC:A6:32" |
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/python3 | |
import requests, argparse, sys | |
response_data = [] | |
# Unit data for different coins - makes display of data a bit nices | |
# coin: [amount to divide balance, amount to divide hashrate, unit of measurement] | |
coins = { | |
'eth': [1000000000000000000, 1000000, ''], |
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 time | |
iface = 'enp1s0f0' | |
log = '95.log' | |
poll_interval = 1 | |
bytes_in = '/sys/class/net/{}/statistics/rx_bytes'.format(iface) | |
bytes_out = '/sys/class/net/{}/statistics/tx_bytes'.format(iface) |
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 | |
"""elixxir_monitor.py: Monitors an elixxir node log for signs of activity and alerts when enough time elapses without activity""" | |
import time, subprocess, select, time, logging, signal, pushover | |
# Wait this long to send alert - default 5 minutes | |
alert_time = 60*5 | |
logfile = "/opt/xxnetwork/node-logs/node.log" |
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
@ECHO OFF | |
SETLOCAL | |
ECHO ASLR Enable / Diable Batch Script - Please run as admin | |
set /p Choice=Want to Enable or Disable ASLR? (e or d):%=% | |
if "%Choice%"=="e" goto :ENABLE | |
if "%Choice%"=="d" goto :DISABLE | |
:ENABLE |
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 xlrd, argparse, openpyxl | |
import pandas as pd | |
SUFFIX_OLD = '_old' | |
SUFFIX_NEW = '_new' | |
def diff(f1, f2, o): | |
df1 = pd.read_excel(f1, sheet_name=0, header=0, index_col=0) |
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 | |
podman container list -a --format "{{.Names}}" | while read i; do podman generate systemd -fn --new $i; done |
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 requests, argparse, pathlib | |
from itertools import accumulate | |
from operator import itemgetter | |
def build_subnet_list(country, threshold): | |
""" | |
Return a list of the largest subnets from the designated | |
country that provide coverage at least up to the threshold amount | |
""" |