Skip to content

Instantly share code, notes, and snippets.

@iomoath
iomoath / twitter-tweet.py
Created December 23, 2021 23:51 — forked from BitTheByte/twitter-tweet.py
Script to tweet like the Official Twitter Application with 2fa support
# -*- coding: utf-8 -*-
from base64 import b64decode,b64encode
from urllib.parse import quote,parse_qs,urlsplit,urlparse
from random import randint
from bs4 import BeautifulSoup
import calendar
import requests
import hashlib
import base64
Java.perform(function() {
console.log(`\n[!] Frida Basic Hooks started
[Info]
[Author] BitTheByte (Ahmed Ezzat)
[GITHUB] https://gist.github.com/BitTheByte/19e5a08fd112275e8d5eeb269c490a09
[Version] v0.1
[Features]
* Enable Debugging Mode for webview(s)
* Root Detection Bypass
@iomoath
iomoath / netsh.txt
Last active March 16, 2022 22:15
Netsh commands
### Allow inbound port:
netsh advfirewall firewall add rule name="TCP Port 1080" dir=in action=allow protocol=TCP localport=1080
### Port Forwarding
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=80 connectaddress=192.168.100.5 connectport=80
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=443 connectaddress=192.168.100.5 connectport=443
@iomoath
iomoath / cert_convert.txt
Last active March 16, 2022 22:17
PEM -- PKCS -- keystore Convert
openssl pkcs12 -export -in fullchain.pem -inkey example_com.key -out example_com.pkcs -name example_com -passout pass:Passw0rd
keytool -importkeystore -deststorepass Passw0rd -destkeypass Passw0rd -destkeystore example_com.store -srckeystore example_com.pkcs -srcstoretype PKCS12 -srcstorepass Passw0rd -alias example_com
openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out example_com.pkcs -name example_com -passout pass:Passw0rd
keytool -importkeystore -deststorepass Passw0rd -destkeypass Passw0rd -destkeystore example_com.store -srckeystore example_com.pkcs -srcstoretype PKCS12 -srcstorepass Passw0rd -alias example_com
@iomoath
iomoath / Custom-AES-GCM.cs
Created November 5, 2021 21:43 — forked from HirbodBehnam/Custom-AES-GCM.cs
A fucked up way to encrypt files with AES-GCM, C# and bouncy castle
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Security.Cryptography;
using Org.BouncyCastle.Crypto.Engines;
using Org.BouncyCastle.Crypto.Modes;
using Org.BouncyCastle.Crypto.Parameters;
@iomoath
iomoath / export_wineventlog.ps1
Last active October 19, 2023 18:16
Powershell script to export Windows Events logs
# Logs to extract from server
$logArray = @("System","Security","Application", "Setup")
# Grabs the server name to append to the log file extraction
$servername = $env:computername
# Provide the path with ending "\" to store the log file extraction.
$destinationpath = "C:\WindowsEventLogs\"
# Checks the last character of the destination path. If it does not end in '\' it adds one.
@iomoath
iomoath / GetDomainUsers.ps1
Created November 23, 2020 12:26
Use this script to extract Windows domain users. Original script from https://github.com/dafthack/DomainPasswordSpray
function Get-ObservationWindow()
{
# Get account lockout observation window to avoid running more than 1
# password spray per observation window.
$command = "cmd.exe /C net accounts /domain"
$net_accounts_results = Invoke-Expression -Command:$command
$stripped_policy = ($net_accounts_results | Where-Object {$_ -like "*Lockout Observation Window*"})
$stripped_split_a, $stripped_split_b = $stripped_policy.split(':',2)
$observation_window_no_spaces = $stripped_split_b -Replace '\s+',""
[int]$observation_window = [convert]::ToInt32($observation_window_no_spaces, 10)
@iomoath
iomoath / GetADUsers.py
Created November 23, 2020 12:22
Modified version of Impacket GetADUsers.py script. This version will display AD account description and also save results automatically to a csv file
#!/usr/bin/env python
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Author:
# Alberto Solino (@agsolino)
#
@iomoath
iomoath / user_timing_attack_test.py
Last active March 23, 2023 02:03
Username enumeration using timing attack
import requests
from random import randint
def read_file_lines(file_path):
with open(file_path) as fp:
return fp.readlines()
def random_with_N_digits(n):
range_start = 10**(n-1)