Dump System log on Windows

If you wanna to dump windows event log, in readable format form debug youre fucking .NET application running on IIS you can do this: Fist of all you need a special tool for this “dumpel.exe” (in pure Microsoft style) part of Windows Resource Kit 2000 (yeah only 9 year ago): You can download from http://support.microsoft.com/kb/927229 Then create a bat or vbs file with this command: dumpel.exe -l Application -f "\\path-to\app_log\app_all.csv"

19 May 2009 @ 00:06 · Updated: 29 June 2026 @ 04:47 · leo

Cisco - page breaks

On Router IOS: To stop the page breaks: # terminal length 0 To resume them: # terminal no length 0 (or number ex. 24) On Pix/ASA: To stop the page breaks. # no pager To resume them: # pager 24

13 April 2009 @ 19:14 · Updated: 30 June 2026 @ 03:28 · leo

Cisco - Get & Save config using telnet

Vi è mai capitato di dover salvare delle configurazione da apparati cisco senza avere un tftp a disposizione? In aiuto un piccolo script: #!/bin/bash host=xx.xx.xx.xx port=23 login=user passwd=pass nobreak='terminal length 0' cmd='show running-config all' (echo open ${host} ${port} sleep 1 echo ${login} sleep 1 echo ${passwd} sleep 1 echo ${nobreak} sleep 1 echo ${cmd} sleep 30 echo exit) | telnet sw01.txt

13 April 2009 @ 19:08 · Updated: 30 June 2026 @ 03:28 · leo

Windows - Disable automatic update from VBS

Sono stufo di cliccare.. Const AU_DISABLED = 1 Set objAutoUpdate = CreateObject("Microsoft.Update.AutoUpdate") Set objSettings = objAutoUpdate.Settings objSettings.NotificationLevel = AU_DISABLED objSettings.Save

12 February 2009 @ 01:20 · Updated: 30 June 2026 @ 03:28 · leo

Discovery Subnet with Ping

Sometime we need to discover an entire subnet. This is a small script not so fast but easy: #!/bin/sh subnet=10.10.10. addr=1 while [ $addr -lt 256 ]; do ping -c 1 -t 1 $subnet$addr /dev/null && echo $subnet$addr Is Alive let addr=addr+1 done

8 February 2009 @ 03:58 · Updated: 30 June 2026 @ 03:28 · leo

Windows - Change IP from command line

Yes, is possibile don’t make lot of click to reconfigure network interfaces under Windows, using “netsh” command like this: For set up static address and metric 1 gateway: netsh interface ip set address name="Local Area Connection" static ip.ip.ip.ip 255.255.255.0 gw.gw.gw.gw 1 For set up static dns: netsh interface ip set dns "Local Area Connection" static xx.xx.xx.xx netsh add dns "Local Area Connection" addr=xx.xx.xx.xx index=2 For setup ip by dhcp: netsh interface ip set address name="Local Area Connection" source=dhcp netsh interface ip set dns name="Local Area Connection" source=dhcp

1 February 2009 @ 19:36 · Updated: 30 June 2026 @ 03:28 · leo

Linux - Send mail from command line

The Linux command line can be very powerful once you know how to use it. You can parse data, monitor Mutt: One of major drawbacks of using the mail command is that it does not support the sending of attachments. mutt, on the other hand, does support it. I’ve found this feature particularly useful for scripts that generate non-textual reports or backups which are relatively small in size which I’d like to backup elsewhere. Of course, mutt allows you to do a lot more than just send attachments. It is a much more complete command line mail client than the “mail” command. Right now we’ll just explore the basic stuff we might need often. Here’s how you would attach a file to a mail: ...

26 January 2009 @ 03:28 · Updated: 30 June 2026 @ 03:28 · leo

PHP - Charset

Questo è dedicato a tutti quei programmatorucoli da quattro soldi che credono che si un problema di server quando nelle loro paginette del cavolo non vedono correttamente i caratteri. Questa cosa: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> Solitamente è quello che viene inserito nelle pagine html. Per chi volesse capire ecco la spiegazione del perché questo non basta, in pratica l’engine legge il codice lo interpreta e restituisce un qualcosa, ovviamente questo qualcosa è definito chiaramente in fase di programmazione se vi dimenticate di inserire la codifica (vedi sotto) come diavolo può sapere l’engine php, che charset avete usato nella pagina? ...

16 November 2008 @ 01:04 · Updated: 30 June 2026 @ 03:28 · leo

Tool - Make Self

Segnalo un tool per creare gli eseguibili autoestraenti sui sistemi *nix sempre utile per ogni evenienza. http://megastep.org/makeself/

11 November 2008 @ 10:47 · leo

PHP - Problem Solving

ini_set( "display_errors", 0);

3 November 2008 @ 13:22 · Updated: 29 June 2026 @ 04:47 · leo