BlackBerry - Full Wipe

Blackberry “Wipe-Handheld” command list: => Options menu => Security Options => General Settings => Menu => Wipe handheld => Enter password (“blackberry” by default or your security password)

4 September 2009 @ 13:07 · Updated: 30 June 2026 @ 03:28 · leo

cisco-decrypt.c

/* Decoder for password encoding of Cisco VPN client. Copyright (C) 2005 Maurice Massar Thanks to HAL-9000@evilscientists.de for decoding and posting the algorithm!This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Requires libgcrypt version 1.1.90 or newer Compile with: gcc -Wall -o cisco-decrypt cisco-decrypt.c $(libgcrypt-config --libs --cflags) Usage: ./cisco-decrypt DEADBEEF...012345678 424242...7261 */ #include <stdio.h> #include <stdlib.h> #include <gcrypt.h> #include <errno.h> int hex2bin_c(unsigned int c) { if ((c >= '0')&&(c <= '9')) return c - '0'; if ((c >= 'A')&&(c <= 'F')) return c - 'A' + 10; if ((c >= 'a')&&(c <= 'f')) return c - 'a' + 10; return -1; } int hex2bin(const char *str, char **bin, int *len) { char *p; int i, l; if (!bin) return EINVAL; for (i = 0; str[i] != '\0'; i++) if (hex2bin_c(str[i]) == -1) return EINVAL; l = i; if ((l & 1) != 0) return EINVAL; l /= 2; p = malloc(l); if (p == NULL) return ENOMEM; for (i = 0; i < l; i++) p[i] = hex2bin_c(str[i*2]) << 4 | hex2bin_c(str[i*2+1]); *bin = p; if (len) *len = l; return 0; } int c_decrypt(char *ct, int len, char **resp, char *reslenp) { const char *h1 = ct; const char *h4 = ct + 20; const char *enc = ct + 40; char ht[20], h2[20], h3[20], key[24]; const char *iv = h1; char *res; gcry_cipher_hd_t ctx; int reslen; if (len < 48) return 0; len -= 40; memcpy(ht, h1, 20); ht[19]++; gcry_md_hash_buffer(GCRY_MD_SHA1, h2, ht, 20); ht[19] += 2; gcry_md_hash_buffer(GCRY_MD_SHA1, h3, ht, 20); memcpy(key, h2, 20); memcpy(key+20, h3, 4); /* who cares about parity anyway? */ gcry_md_hash_buffer(GCRY_MD_SHA1, ht, enc, len); if (memcmp(h4, ht, 20) != 0) return -1; res = malloc(len); if (res == NULL) return -1; gcry_cipher_open(&ctx, GCRY_CIPHER_3DES, GCRY_CIPHER_MODE_CBC, 0); gcry_cipher_setkey(ctx, key, 24); gcry_cipher_setiv(ctx, iv, 8); gcry_cipher_decrypt(ctx, (unsigned char *)res, len, (unsigned char *)enc, len); gcry_cipher_close(ctx); reslen = len - res[len-1]; res[reslen] = '\0'; if (resp) *resp = res; if (reslenp) *reslenp = reslen; return 0; } int main(int argc, char *argv[]) { int i, len, ret = 0; char *bin, *pw; gcry_check_version(NULL); for (i = 1; i < argc; i++) { ret = hex2bin(argv[i], &bin, &len); if (ret != 0) { perror("decoding input"); continue; } ret = c_decrypt(bin, len, &pw, NULL); free(bin); if (ret != 0) { perror("decrypting input"); continue; } printf("%s\n", pw); free(pw); } exit(ret != 0); } Download: cisco-decrypt

20 August 2009 @ 02:28 · Updated: 30 June 2026 @ 03:28 · leo

Windows - Reset resolution from registry

Durante una migrazione di datacenter mi è capitato di aver fuori uso la console di un server perchè la risoluzione della scheda video è fuori range del monitor, avendo accesso RDP la soluzione è presto trovata dal registro di sistema nella seguente posizione: My Computer\HKEY_CURRENT_CONFIG\System\CurrentControlSet\Control\VIDEO Trovando la stringa “Monitor” si potrebbe cambiare direttamente la risoluzione, ma personalmente ho cancellato tutto il contenuto e riavviato così facendo ha ricreato le configurazione di default.

15 August 2009 @ 15:27 · Updated: 30 June 2026 @ 03:28 · leo

OpenSSH - Generate server key

OpenSSH require different keys depending if you use SSH1 or SSH2 protocol. All keys are generated by “ssh-keygen” commad, that one should be available on your system with the ssh package. Default key lengths are also appropriate (2048 bits for rsa and 1024 bits for dsa) For SSH1 protocol, you need a rsa1 key generated has follow: # ssh-keygen -q -f /etc/ssh/ssh_host_key -N '' -t rsa1 For SSH2 protocol, you need two keys, one rsa key and one dsa key generated has follow: ...

11 August 2009 @ 22:08 · Updated: 30 June 2026 @ 03:28 · leo

Cisco ASA - Enable SSH

If you have tried to setup SSH access on a new ASA, it might not have worked the way you wanted. That is because the RSA keys need to be generated first. To do that: from configure terminal: fw01/act(config)# crypto key generate rsaINFO: The name for the keys will be: Keypair generation process begin. Please wait… And then configure SSH to be allowed from the inside interface: fw01/act(config)# ssh (inser your ip) (insert your netmask) outside ...

6 August 2009 @ 00:32 · Updated: 30 June 2026 @ 03:28 · leo

Vim - Fix arrow keys that display A B C D on remote shell

A little fix for arrow keys in Vim, that display A B C D on remote terminal if in the system you don’t wanna declare “TERM” just insert into yout ~/.vimrc the terminal type like this: set term=xterm

22 July 2009 @ 10:57 · Updated: 30 June 2026 @ 03:28 · leo

Cool Tools for OpenSPARC

Optimized Applications for Solaris OS and OpenSparc computing. Simple and very useful example is “Cool Stack” a web deployment packge include most commonly used free and open source applications, recompiled to deliver a 30 to 200 percent performance improvement over standard binaries compiled with GCC. Cool Tools.

21 July 2009 @ 03:09 · leo

CSW packaging

Memo: Solaris package. CSW packaging home.

21 July 2009 @ 02:52 · leo

Satellite

[caption id=“attachment_524” align=“alignleft” width=“512” caption=“9° Est”][/caption] Recentemente ho rifatto i puntamenti di alcune parabole, qui in particolare il grafico dello spettro del satellite Eurobird 9° Est (Ex Hotbird 2 ora riposizionato) facente parte della flotta Eutelsat.

18 July 2009 @ 05:06 · Updated: 29 June 2026 @ 05:26 · leo

Asterisk - Eutelia SIP

Questo risulta essere un argomento un po’ delicato sopratutto sconsigliato a chi non ha un minimo di dimestichezza con asterisk, dal momento che non mi dilunghero troppo in spiegazioni sul funzionamento ma darò indicazioni essenziali e basta. Chiunque abbia provato ad usare asterisk su eutelia una volta skypho è sicuramente incappato in qualche problema sia sulla parte di registrazione sia sulla parte di streaming dei flussi rtp, la spiegazione di tutto ciò è abbastanza semplice eutelia appoggia il sistema sip che distribuisce ai cliente utilizzando il Cisco SIP Gateway, lo si può capire velocemente facendo debug. Questa soluzione spesso non è molto propensa a dialogare con asterik in modo standard, pertanto se state usando interfacce GUI o soluzioni embedded potete smettere di leggere perchè la maggior parte delle volte è impossibile uscire dagli schemi imposti. ...

18 July 2009 @ 04:55 · Updated: 30 June 2026 @ 03:28 · leo