Skip to content

Instantly share code, notes, and snippets.

@saudiqbal
saudiqbal / dynamic_ipv6_update.sh
Created March 12, 2019 00:07 — forked from Callumpy/dynamic_ipv6_update.sh
Dynamic IPv6 Firewall Update Script for OpenWRT
#!/bin/sh
# CONFIGURABLE PARAMETER: PREFIX
# Set the prefix to the name of the rules that need to be updated. (Can update multiple rules with same name)
PREFIX=Web-ServerIPv6
PREFIX_LEN=${#PREFIX}
# CONFIGURABLE PARAMETER: getIP
# Set your method of getting IPv6 address in here
# Current method is through ip neighbor with MAC address (Lowercase, :)(getIP=$(ip neighbor | grep "Your MAC Here" | grep -v "STALE" | cut -d" " -f1))
@saudiqbal
saudiqbal / port_scanner.php
Created June 3, 2018 05:58 — forked from akalongman/port_scanner.php
Port scanner on PHP
<?php
ini_set('max_execution_time', 0);
ini_set('memory_limit', -1);
$host = 'google.com';
$ports = array(21, 25, 80, 81, 110, 143, 443, 587, 2525, 3306);
foreach ($ports as $port)
{
$connection = @fsockopen($host, $port, $errno, $errstr, 2);