Skip to content

Instantly share code, notes, and snippets.

@safebuffer
Created January 29, 2019 08:25
Show Gist options
  • Save safebuffer/8d4d46ae2678a704776d1a10f6d5239e to your computer and use it in GitHub Desktop.
Save safebuffer/8d4d46ae2678a704776d1a10f6d5239e to your computer and use it in GitHub Desktop.
get libc address to check ASLR stuff
Filee=$1
getaddr(){
addr=`ldd $Filee | cut -d " " -f2 | head -n 1|tr -d "(|)" `
echo $addr
}
for i in {1..5}; do
if [ "$( getaddr )" == "$( getaddr )" ]; then
echo "[+] $( getaddr ) == $( getaddr ) "
echo "[+] ASLR disabled ! "
exit 1
fi
echo "[+] Address " $( getaddr )
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment