Skip to content

Instantly share code, notes, and snippets.

sudo apt update
sudo apt install qemu-user-static
sudo update-binfmts --install i386 /usr/bin/qemu-i386-static --magic '\x7fELF\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xf8\xff\xff\xff\xff\xff\xff\xff'
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386 zlib1g-dev:i386
sudo apt-get install libc6-dev-i386 libx32gcc-4.8-dev nasm
@massihm
massihm / Nasm_Setup_instructions_linux.txt
Last active November 23, 2022 16:48
assembly lib requirements for linux
sudo apt update
sudo add-apt-repository universe
sudo apt install -y libc6 libncurses5 libstdc++6 zlib1g zlib1g-dev libc6-dev-i386 g++ nasm gdb
sudo apt install libx32gcc-<version>-dev
// if you use ubunto Xenial(16.04LTS), use version 4.8 or 5 (replace <version> with 4.8 or 5)
// else if Bionic (18.04LTS), use version 8
// and for Focal (20.04LTS), use version 10
nano file.asm
@massihm
massihm / IsOddGen.ps1
Last active November 23, 2022 16:47
isOdd PhpFunctionGenerator for Powershell
Write-Output "Function isOdd(`$int){" > ".\code.php";
for($i=0;$i-lt10000;$i+=2){
Write-Output " if(`$int == $i) return false;" >> ".\code.php";
Write-Output " if(`$int == $($i+1)) return true;" >> ".\code.php";
}
Write-Output "}" >> ".\code.php";
@massihm
massihm / IsOdd.php
Last active November 23, 2022 16:46
isOdd Function for PHP
Function isOdd($int){
if($int == 0) return false;
if($int == 1) return true;
if($int == 2) return false;
if($int == 3) return true;
if($int == 4) return false;
if($int == 5) return true;
if($int == 6) return false;
if($int == 7) return true;
if($int == 8) return false;
@massihm
massihm / psRandomString.psm1
Last active May 21, 2021 12:58 — forked from marcgeld/psRandomAlphaNumeric.ps1
Powershell: Generate a random Alphanumeric string
# Generate a random Alphanumeric string
Function Get-RandomString {
[CmdletBinding()]
Param (
[int] $length = 8,
[switch]$alphabet,
[switch]$number,
[switch]$symbol
)