Category Archives: Bash

Git remove commit history

http://stackoverflow.com/questions/13716658/how-to-delete-all-commit-history-in-github

Keepalived – Spamming /var/log/syslog ->

If you’re just using keepalived to manage IP addresses (i.e. you’re not using the virtual_server or lvs_sync_daemon features), it’s possible to run it under a Linode kernel by disabling LVS/IPVS features. Simply pass in the –vrrp (or -P) option on the command-line (add it to DAEMON_ARGS in /etc/default/keepalived in Debian/Ubuntu) and you’ll be good to go!

 

php compile from source configure

./configure \
–prefix=/usr/local \
–with-ldap=/usr \
–with-libdir=lib64 \
–with-kerberos=/usr \
–enable-cli \
–with-zlib-dir=/usr \
–enable-exif \
–enable-ftp \
–enable-mbstring \
–enable-mbregex \
–enable-sockets \
–enable-maintainer-zts \
–with-curl=/usr \
–with-config-file-path=/etc \
–sysconfdir=/private/etc \
–with-mysql-sock=/var/mysql/mysql.sock \
–with-mysql=mysqlnd \
–with-mysqli=mysqlnd \
–with-pdo-mysql=mysqlnd \
–with-xmlrpc \
–with-xsl=/usr \
–without-pear \
–with-libxml-dir=/usr \
–with-iconv-dir=/usr/local \
–with-gd \
–with-jpeg-dir=/opt/local \
–with-png-dir=/opt/local \
–with-freetype-dir=/opt/local \
–with-mcrypt=/opt/local \
–with-openssl \
–enable-debug –enable-maintainer-zts \
–enable-pthreads –enable-mbstring \
–enable-fpm

Linux Ebury

ssh -G 2>&1 | grep -e illegal -e unknown > /dev/null && echo "System clean" || echo "System infected"

dhcpv6 config

http://linux.ardynet.com/ipv6setup.php

Ping with timestamp

ping 192.0.0.0 | perl -nle ‘print scalar(localtime), ” “, $_’

nmap cheatsheet

http://pen-testing.sans.org/blog/2013/10/08/nmap-cheat-sheet-1-0

iser target login

Execute script on boot

don’t forget to set the correct permissions on your script, i like 4755 for these types of scripts

Unsign, resign and update .JAR manfests

A .jar file is simply a .zip with a funky extension. Rename the .jar to .zip and unzip the file.

CD into the META-INF dir and delete everything EXCEPT the manifest file.

Edit the Manifest file and remove all the SHA hashes (probably not necessary)

Once this has been done, rezip the file

Now we need to sign the jar. (Make sure you have the latest JDK installed)

To do this we create a key:

Follow the bouncing ball filling in all the details.

Then sign your JAR file with the following:

That is it!