App-Cheats
view release on metacpan or search on metacpan
# Apply a patch file (-p1 ignore first later)
patch -p1 < ../test.patch
# Fix: "sh: -c: line 0: syntax error near unexpected token `('"
system qq(/bin/bash -c "diff -u <(echo a) <(echo b)");
system qq(/bin/bash -c "diff -u <(echo \\"a a2 a3\\") <(echo \\"b b2 b3\\")");
#############################################################
## Linux Commands - dos2unix
#############################################################
# Fix files endings of all files in folder (recursive)
find . -type f -print0 | xargs -0 dos2unix
# Convert newlines to unix format (trim off carriage returns, like dos2unix)
perl -lpe 'BEGIN{$n=chr 13; $r=qr/$n$/} s/$r//'
#############################################################
## Linux Commands - dpkg
#############################################################
# Print dpkg architecture (DES,machine)
# When installing packages.
dpkg --print-architecture
#############################################################
# Dashboard for websites status (Jira)
nagios
#############################################################
## Netcat Listener (nc)
#############################################################
# Start netcat listener on a specific port (Unix)
nc -nlvp 4445
# Start netcat listener on a specific port (MacOS)
nc -nvl 4444
# Reverse Shell - Netcat
# Listener.
sudo ncat -lnvp 87
# Reverse Shell Connect - Bash
- key: [mypass]
$X4]hmac: [PÃE4 AÃ5^äÃñKÃóºb
hello jwt
#############################################################
## Perl Modules - Crypt::PasswdMD5
#############################################################
# Generate MD5 Password
perl -MCrypt::PasswdMD5 -lE 'say unix_md5_crypt('pass','salt')'
openssl passwd -1 -salt salt pass
#############################################################
## Perl Modules - Cwd
#############################################################
# Get current working directory (slightly different than pwd)
perl -MCwd -le 'print getcwd'
$pm->wait_all_children;
'
#############################################################
## Perl Modules - PerlIO
#############################################################
# View the encoding layers applied to a filehandle.
perl -E 'say for PerlIO::get_layers(*STDOUT)'
unix
perlio
perl -C -E 'say for PerlIO::get_layers(*STDOUT)'
unix
perlio
utf8
perl -CO -E 'say for PerlIO::get_layers(*STDOUT)'
unix
perlio
utf8
#############################################################
## Perl Modules - Pod::Usage
#############################################################
# Pull out a section from pod
perl -MPod::Usage=pod2usage -E "pod2usage(-input => `perldoc -l ojo`, -verbose => 99, -sections => '.*/x');"
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
' | sudo tee /etc/apt/preferences.d/mozilla-firefox
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
#############################################################
## SQLite3 Database
#############################################################
# Install sqlite on Unix (after in zipping the amalgamation file. make sure these 3 are present:
# shell.c, sqlite3.c, sqlite3.h). rename to a.out to sqlite3
# (database, sqlite3)
gcc shell.c sqlite3.c -lpthread -ldl
# View all the tables in a database (database, sqlite3)
sqlite3 my.db '.tables'
# Turn on column names on query results (database, sqlite3)
sqlite3 my.db '.explain on' 'select * from page_groups'
( run in 0.953 second using v1.01-cache-2.11-cpan-64ef6c95b5d )