Skip to content

Instantly share code, notes, and snippets.

View othmanalikhan's full-sized avatar
💭
Science!

Othman Alikhan othmanalikhan

💭
Science!
View GitHub Profile
@othmanalikhan
othmanalikhan / commands_echolife_hg532b
Last active March 14, 2020 13:10
A list of commands that can be executed after telnetting into echolife HG532b (STC Huwaei Modem) or similar devices
ALL COMMANDS
============
COMMAND ABBREVIATION.
PURPOSE.
MORE INFO.
EXAMPLE USAGE.
[/test Left Bracket Executable.
Commonly unused?
e.g. [ zebra ] && echo "YES" || echo "NO"
@othmanalikhan
othmanalikhan / guide_ldap3.py
Last active March 10, 2021 17:55
Quick Start: Using Python LDAP3 library with Microsoft AD. Includes reading/writing attributes, and AD password resetting, (LAST UPDATED: 2021-03)
"""
IMPROVING DEVELOPMENT WORKFLOW
------------------------------
Problem: LDAP error messages from MS AD are vague and sometimes even misleading.
Solution:
A. Replicate the operations you would like to code manually using `LDAP Admin` and `Wireshark` and study.
1.1. Using `LDAP Admin`, ensure you connect to the LDAP server without using TLS.
@othmanalikhan
othmanalikhan / quick_server.py
Created January 27, 2022 13:43
Bare bones Python (Flask) Upload/Download Server
"""
Bare bones download/upload Python server using Flask.
"""
import os
from flask import (
Flask, redirect, render_template_string, request, send_from_directory
)
from werkzeug.utils import secure_filename
@othmanalikhan
othmanalikhan / how_bookstack.md
Last active December 20, 2023 06:04
Installing BookStack (Debian 11) (2022-11)

Installation: Installing BookStack (Debian 11)

The following guide assumes running the commands below as root for simplicity. Later in the guide directory permissions are restricted to follow the principle of least privilege.

  1. Install dependencies.
    apt install -y git unzip apache2 php7.4 curl php7.4-fpm php7.4-curl php7.4-mbstring php7.4-ldap \
    php7.4-tidy php7.4-xml php7.4-zip php7.4-gd php7.4-mysql libapache2-mod-php7.4 \
    
@othmanalikhan
othmanalikhan / find_user_scheduled_tasks.ps1
Created June 5, 2024 08:49
Pentest Utility: Find Scheduled Tasks on Windows Created by Users
# Get a list of built-in accounts
$builtInAccounts = @(
"Administrator",
"DefaultAccount",
"Guest",
"SYSTEM",
"LOCAL SERVICE",
"NETWORK SERVICE"
)