Skip to content

Instantly share code, notes, and snippets.

View smhuda's full-sized avatar
🖥️
hack the stack!

Syed M. Huda smhuda

🖥️
hack the stack!
View GitHub Profile
@smhuda
smhuda / remove-audio.py
Created September 2, 2024 10:41
Remove audio from video files in bulk
import os
import subprocess
# Specify the folder containing the videos
folder_path = "/Users/myuser/Downloads/vidz"
# Create a new folder to save the output videos without audio
output_folder = os.path.join(folder_path, "no_audio_videos")
if not os.path.exists(output_folder):
os.makedirs(output_folder)
@smhuda
smhuda / OneRuleToRuleThemStill.rule
Created November 12, 2023 13:31
An optimised revamp of OneRuleToRuleThemAll - best one for Hashcat
##################################################################
# *** OneRuleToRuleThemStill *** #
# #
# An optimised revamp of OneRuleToRuleThemAll #
# #
# ~5% rules reduction with 0% performance loss #
# against Lifeboat and LastFM data breaches #
# #
# Updates: #
# - De-duplication of resulting candidate generation #
@smhuda
smhuda / iptables-for-openvpn-redirect.txt
Created October 19, 2023 10:24
IPtables rules for setting up OpenVPN traffic to redirect to Burp Proxy for Non-Proxy Aware Apps
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 80 -j REDIRECT --to-port 8080 &&
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 443 -j REDIRECT --to-port 8080 &&
sudo iptables -t nat -A POSTROUTING -s 192.168.5.59/24 -o eth0 -j MASQUERADE &&
sudo iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 80 -j REDIRECT --to-port 8080 &&
sudo iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 443 -j REDIRECT --to-port 8080 &&
sudo iptables -t nat -A POSTROUTING -s 192.168.5.59/24 -o eth0 -j MASQUERADE
@smhuda
smhuda / cidr-to-ip-lister.py
Created July 3, 2023 15:37
Convert CIDRs to an IP address list
# pip3 install netaddr
from netaddr import IPNetwork
with open("scope.txt", "r") as file:
for x in file:
for a in IPNetwork(x):
print('%s' % a)
@smhuda
smhuda / mount-shared-folders.sh
Created December 16, 2022 22:40
Mount Shared Folders VMWare
#!/bin/bash
vmware-hgfsclient | while read folder; do
echo "[i] Mounting ${folder} (/mnt/hgfs/${folder})"
mkdir -p "/mnt/hgfs/${folder}"
umount -f "/mnt/hgfs/${folder}" 2>/dev/null
vmhgfs-fuse -o allow_other -o auto_unmount ".host:/${folder}" "/mnt/hgfs/${folder}"
done
sleep 2s
@smhuda
smhuda / mobsf-pullnrun.sh
Created December 14, 2022 12:52
Pulls a MobSF docker image and then runs its (non-persistent)
#!/usr/bin/env bash
sudo bash -c 'docker pull opensecurity/mobile-security-framework-mobsf';
sudo bash -c 'docker run -it --rm -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest'
@smhuda
smhuda / nmap2csv.py
Created February 18, 2021 20:09
Nmap to CSV Parser
#!/usr/bin/env python
"""
Nmap2CSV is a simple Python script to convert XML (-oX) Nmap or Masscan
output files to a single CSV spreadsheet which summarizes all hosts and open
ports in a table in IP,PORT1,PORT2,PORT3,...,PORTN format: The first row is
the header with all open ports found on the scanned hosts. In the following
rows the specified character (default X) marks if the given port was found
open on the given host. The script also generates per-target results which
includes version information, if it is available.
@smhuda
smhuda / nessus-merger.py
Created February 18, 2021 20:08
Nessus Findings DB File Merger
# file: merger.py
# based off: <http://cmikavac.net/2011/07/09/merging-multiple-nessus-scans-python-script/>
# by: mastahyeti
import xml.etree.ElementTree as etree
import shutil
import os
first = 1
for fileName in os.listdir("."):
@smhuda
smhuda / build-review-audit.ps1
Created February 18, 2021 20:07
Build Review Security Audit
#RECORDING TRANSCRIPT TO DUMP FILE
$CurrentDir = $PSScriptRoot
$ServerName = $env:computername
$DumpFilePath = "$CurrentDir\\"+$ServerName+"-CONFIG_DUMP_$(get-date -Format yyyymmdd_hhmmtt).txt"
Start-Transcript -Path $DumpFilePath -NoClobber
Write-Host
Write-Host 'Checking if your PowerShell Script Execution Policy is set to Unrestricted' -ForegroundColor Yellow -BackgroundColor Black
Start-Sleep -s 5
@smhuda
smhuda / nessus-parser.pl
Created February 18, 2021 20:06
Nessus Findings Parser
#!/opt/local/bin/perl
use strict;
use XML::TreePP;
use Data::Dumper;
use Math::Round;
use Excel::Writer::XLSX;
use Data::Table;
use Excel::Writer::XLSX::Chart;
use Getopt::Std;
#use Devel::Size qw(size total_size); ############# New module