28 Nov 2009
Howto send email from bash on DLink DNS-323
This can be done only on hacked dns-323
ffp/fun_plug.
Many people have problem sending emails from shell scripts using DNS-323,
it is possible without installing additional software
or writing scritps.
Sending emails right from bash scripts in DNS-323 is quite easy, but it took me some time to make it work.
23 Nov 2009
Getch() function in Linux
Some long time ago I was searching for GetCh() implementation on Linux, and I've entered google new groups and found some good stuff.
Today durning some cleanings on my system I've found saved html page with this, so i will paste it here (this blog is my notepad recenty).
Almost winter
I would like to ride snowboard/ski someday like these guys, the music is also quite nice.
17 Nov 2009
Some helpful Linux software
Network
Some tools which could be helpful in network and system troubleshooting
- driftnet - Picks out and displays images from network traffic
- ettercap - Multipurpose sniffer/interceptor/logger for switched LAN
- netcat - TCP/IP swiss army knife
- arping - sends IP and/or ARP pings (to the MAC address)
- mtr - Full screen ncurses and X11 traceroute tool
- nmap - The Network Mapper
- wireshark - network traffic analyzer - GTK+ version
- tshark - network traffic analyzer - console version
- tcpdump - A powerful tool for network monitoring and data acquisition + manual
- arptools - arp scanning and fingerprinting tools
- iptraf - Interactive Colorful IP LAN Monitor
- p0f - Passive OS fingerprinting tool
- tcpreplay - Tool to replay saved tcpdump files at arbitrary speeds
- ngrep - grep for network traffic
- netsed - The network packet altering stream editor
- InTrace - Traceroute-like application that enables users to enumerate IP hops. It could be useful for network reconnaissance and firewall bypassing.
- nload - A realtime console network usage monitor
System
Some tools which may be helpfull to deal with hardware/security
- sysstat - sar, iostat and mpstat - system performance tools for Linux
- isag - Interactive System Activity Grapher for sysstat
- ccze - A robust, modular log coloriser
- lsof - List open files, pipes, sockets, etc.
- collectd - statistics collection and monitoring daemon
- hddtemp - hard drive temperature monitoring utility
- iotop - simple top-like I/O monitor
- htop - interactive processes viewer
- beep - advanced pc-speaker beeper
Database management
- mtop - MySQL terminal based query monitor
- mytop - top like query monitor for MySQL
- ptop - PostgreSQL performance monitoring tool akin to top
Gentoo stuff :P
If you're working on Gentoo box you should think about:
- portage-utils - http://www.gentoo.org/doc/en/portage-utils.xml
- gentoolkit - http://www.gentoo.org/doc/en/gentoolkit.xml
Disable buzzer
# in ~/.bashrc setterm -blength 0Did I missed something? If there is some cool stuff that I could need, please write it in comments below.
Linux IMAP Mail Notifier
Linux Tip: Color enabled pager - less
Recently I was using a command line tool which was generating many lines of color text.
The output was displayed so fast on my xterm, that I couldn't read it.
So I thought, that I could use "| less" pager to see what's up, and I was wrong :( -
less "out of the box" doesn't support colors.
I've tried most pager but I prefer less.
... but there is a way!
Less doesn't support colors "as it is", but there are some hacks. Thanks rha7dotcom.export LESS="-RSM~gIsw"
- R - Raw color codes in output (don't remove color codes)
- S - Don't wrap lines, just cut off too long text
- M - Long prompts ("Line X of Y")
- ~ - Don't show those weird ~ symbols on lines after EOF
- g - Highlight results when searching with slash key (/)
- I - Case insensitive search
- s - Squeeze empty lines to one
- w - Highlight first line after PgDn
LESS works only if you software you want to page uses RAW ASCII colors not those ncursed based!
Color man pages using less pager
Thanks Nionexport LESS_TERMCAP_mb=$'\E[01;31m' export LESS_TERMCAP_md=$'\E[01;31m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCAP_us=$'\E[01;32m'To make it available for full time add this entries to your ~/.bashrc or ~/.${SHELL}rc. Hope this helps someone.
3 Nov 2009
MySQL and UTF-8 - locales and some advanced settings
Default locales, and collation in MySQL since 4.1 is latin1_swedish_ci, it works well but if you have some polish
texts it's not so good, there is way to change defaults, and it is quite easy.
After installation of MySQL edit your config file (default location of this file is /etc/mysql/my.cnf).
Subscribe to:
Posts (Atom)
