Friday, May 25, 2012

Linux get quota by folder



if you get "Disk quota exceeded", then you like know what happened with your folders


$find . -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n


$du
$df

woks too

references:
[1] http://www.codecoffee.com/tipsforlinux/articles/22.html

Wednesday, May 16, 2012

Making sniffer using libpcap




[0] http://www.tcpdump.org/pcap.html
[1] http://www.joshuarobinson.net/docs/libpcap_offline.html
[2] http://yuba.stanford.edu/~casado/pcap/section1.html
[3] http://www.winpcap.org/docs/docs_40_2/html/group__wpcapsamps.html
[4] http://www.linuxquestions.org/questions/programming-9/undefined-reference-to-functions-from-pcap-h-319252/

package samples
[5] http://wiki.wireshark.org/SampleCaptures



Tutorial how to
[1] http://www.linuxforu.com/2011/02/capturing-packets-c-program-libpcap/


More
http://www.tcpdump.org/pcap.html
http://networksecurity.org.ua/0596007949/networkst-chp-10-sect-2.html
http://www.tcpdump.org/pcap/pcap.html
http://commons.oreilly.com/wiki/index.php/Network_Security_Tools/Modifying_and_Hacking_Security_Tools/Writing_Network_Sniffers
 http://eecs.wsu.edu/~sshaikot/docs/lbpcap/
http://www.eecis.udel.edu/~sunshine/expcs/code/pcap_packet_read.c


Source:
[1] http://code.google.com/p/chengchuntu1/source/checkout
[2] http://sock-raw.org/papers/syn_scanner





Friday, April 06, 2012

Fix Low Volume


$sudo alsamixer         #customize
$sudo alsactl store     #save customized

References:
[1] http://agnipulse.com/2009/07/fix-low-volume-issues-in-ubuntu/

Wednesday, April 04, 2012

gpg steps



export public key to asc
gpg -a --export FD9C1B26  > jfiq.pub


sign file/get pk
gpg -s segc-tarefa02.txt

sign file to asc format/get pk
gpg --clearsign segc-tarefa02.txt

add public key
gpg --import mo639_1s2012.pub

encrypt file/get uid
gpg -e -a segc-tarefa02.txt

References:

http://www.guiafoca.org/cgs/guia/avancado/ch-d-cripto.html

http://eriberto.pro.br/wiki/index.php?title=Usando_o_GnuPG

http://www.gnupg.org/gph/en/manual/x135.html

Ubuntu Forware port 80

  #!/bin/bash iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8069 iptables -t nat -A PREROUTING -i eth0 -p tc...