Skip to content

Instantly share code, notes, and snippets.

@motebaya
motebaya / emailnator.py
Created August 7, 2024 13:32
Asynchronous emailnator.com api wrapper
#!/usr/bin/python3
# emailnator.com api wrapper - 01/06/2024
# @github.com/motebaya
from httpx import AsyncClient
from urllib.parse import urlparse, unquote
from typing import Dict, Any, Union, List
from colorama.ansi import Fore as col
import json
class Emailnator:
@motebaya
motebaya / chp-adsplugin-element-remover.js
Last active August 4, 2024 10:46
tampermonkey: just for remove modal/popup element from wp plugin: https://wordpress.org/plugins/chp-ads-block-detector/
// ==UserScript==
// @name remove ads detection ele
// @namespace http://tampermonkey.net/
// @version 2024-08-04
// @description remove modal from plugin: https://wordpress.org/plugins/chp-ads-block-detector/
// @author Lorem ipsum kolor si slamet
// @match *://<domain here>/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=<domain here>
// @grant none
// ==/UserScript==
@motebaya
motebaya / compile.bat
Created July 5, 2024 14:07
my windows nuitka pack arg
nuitka --mingw64 --standalone --output-dir=output --show-progress --show-memory --windows-company-name=Windows --windows-product-name=Windows --windows-file-version=1.0.0 --windows-product-version=1.0.0 --onefile --include-module=calculation --follow-imports revenue.py --output-filename=revenue.exe --remove-output
@motebaya
motebaya / track_pid.sh
Last active May 29, 2024 12:44
Tracking PID based on the program name being executed by php7.4 and give it into GDB
#!/usr/bin/bash
track_pid() {
ps_output=$(ps aux | grep programname | head -1)
while IFS= read -r line; do
if [[ $line == *"php7.4"* ]]; then
pid=$(echo "$line" | awk '{print $2}')
echo "[OK] Found PHP process with PID: $pid"
# sleep 1
gdb -p "$pid" -x "command.txt"
@motebaya
motebaya / asmtool.py
Created April 17, 2024 18:02
simple script that help me to RE python bytecode
#!/usr/bin/python3.11
# it help me for RE, @github.com/motebaya
# useless tool :) tools 17.04.2024
from typing import Dict
from xdis import magics
import re, os, types, marshal, argparse
class Asmtool:
def __init__(self) -> None:
@motebaya
motebaya / concurrency-vs-parallelism-io.rb
Last active June 24, 2024 10:29
diving deeper and experiment with concurrency and parallelism in Ruby for I/O bound operations.
#!/usr/bin/ruby
# copyright - 2024.03.12 motebaya
require "async"
require "async/barrier"
require "async/http/internet"
require "benchmark"
require "httparty"
require "concurrent"
require "parallel"
@motebaya
motebaya / solve_gdb.md
Last active February 23, 2024 10:12
GDB: ptrace: Operation not permitted.
This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Downloading separate debug info for /usr/bin/php7.4
(No debugging symbols found in /usr/bin/php7.4)                                               
(gdb) attach 350091
Attaching to program: /usr/bin/php7.4, process 350091
set debuginfod-url "https://debuginfod.ubuntu.com"
set debuginfod-index-urls "https://debuginfod.ubuntu.com"
set debuginfod enabled on
@motebaya
motebaya / Microsoft.PowerShell_profile.ps1
Last active April 5, 2024 06:35
personal windows powershell config
# theme
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/craver.omp.json" | Invoke-Expression
# aliases
New-Alias py python310
New-Alias rb ruby
# Omp history
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
@motebaya
motebaya / agWallpaperHd.js
Last active March 17, 2024 20:38
Aether Gazer Global/Cn Wallpaper HD downloader with native node js module. moved to -> https://github.com/motebaya/AgwpHd for easy maintenance
#!/usr/bin/env node
const https = require("node:https");
const path = require("node:path");
const fs = require("fs");
/**
* aether gazer global wallpaper downloader.
* @gist.github.com/motebaya at 26.11.2023 - 1.24PM
* credit: davins/mochino