Skip to content

Instantly share code, notes, and snippets.

View mah3uz's full-sized avatar
🏠
Working from home

Mahfuz Shaikh mah3uz

🏠
Working from home
View GitHub Profile
@mah3uz
mah3uz / check_open_port.py
Last active March 12, 2016 19:29
Check Open Port
#!/usr/bin/python
import socket
ip = raw_input("Enter the IP: ")
port = input("Enter the Port: ")
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if s.connect_ex((ip, port)):
print "Port", port, "is closed"
else:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://localhost:8069/
@mah3uz
mah3uz / exploit.py
Created August 26, 2016 19:40 — forked from AE5/exploit.py
if __name__ == '__main__':
import sys
import mp4
import argparse
def write_file(path, content):
with open(path, 'wb') as f:
f.write(content)
def addr(sval):
@mah3uz
mah3uz / README.md
Created April 2, 2017 12:00 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@mah3uz
mah3uz / BackupCommand.php
Created January 16, 2018 06:21
Backup, clean, list, and monitor multiple sites.
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Config;
class BackupCommand extends Command
{
protected $sites = [];
@mah3uz
mah3uz / html2ebook.py
Created May 10, 2018 19:18 — forked from juancarlospaco/html2ebook.py
HTML5 to eBook converter, with Table Of Contents, Compression, optional Metadata, optional output filename, Mobile Friendly, ePub v.3.0.1 compliant, runs as standalone, run as module, Python3, NO Dependencies just Python Standard Lib only.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""HTML2eBook a tiny function that converts HTML5 to eBook,Mobile Friendly."""
import os
import zipfile
from getpass import getuser
@mah3uz
mah3uz / regexCheatsheet.js
Created January 16, 2019 09:22 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"

Keybase proof

I hereby claim:

  • I am mah3uz on github.
  • I am mah3uz (https://keybase.io/mah3uz) on keybase.
  • I have a public key ASC31q0TADg62AUnC-5jbwT7rUyVoqDupbEJ6Dl8wMPiuAo

To claim this, I am signing this object:

@mah3uz
mah3uz / kali_osx_persistence_wifi.md
Created February 4, 2020 17:12 — forked from widdowquinn/kali_osx_persistence_wifi.md
Kali Linux Live USB with persistence and wireless on Macbook Pro

Kali Linux Bootable USB with Persistence and Wireless on OSX

Download the appropriate Kali Linux .iso

I used a 64 bit .iso image, downloaded via HTTP. I downloaded the amd64 weekly version, as the pool linux headers (needed below for installation of wireless drivers) were ahead of the stable release kernel.

Download the SHA256SUMS and SHA256SUMS.gpg files from the same location.

@mah3uz
mah3uz / bashrc
Created March 15, 2021 16:07 — forked from mislav/bashrc
Basic vimrc and tmux config for servers
PS1='\[\033[31m\]\w\[\033[0m\] $ '
export EDITOR=vim
alias st='git status -sb'