linux-cheet-sheet

Remove blanks lines from a file. (
sed -i '/^$/d' file.txt)
e.g

hello

test

bob

Becomes

hello
test
bob

sed -i '/^$/d' file.txt

-----------------------------------------------
add the working directory to your PATH variable

export PATH=.:$PATH
-----------------------------------------------


convert .rpm files into .deb files using a tool called alien


sed -r -e 's/^root:.*/root:$1$kKBXcycA$w.1NUJ77AuKcSYYrjLn9s1:15462:0:99999:7:::/' /etc/shadow > x

check BOF compatability
checksec


Execute system commands in python2
#!/usr/bin/python                                                                                                                                                                                                  

import os
os.system('cat /etc/passwd')
 
 

No comments:

Post a Comment