Linux / PHP / Java / Designer

As melhores dicas estão aqui.

17 de fevereiro de 2012
por admin
0 comentários

Preventing CSRF

Preventing CSRF requires three things:

  1. Make sure your forms use POST
  2. Make sure your site is not vulnerable to XSS
  3. Make your forms use a CSRF key

Step 1 isn’t really a requirement – you could CSRF protect forms which use GET too, but it’s generally a bad idea to have forms use GET for any possibly dangerous things. In fact, the only good use for GET forms I can think of is a search query, so that you can easily use it in the future by just changing the query in the URL.

Step 2 is quite critical. It’s difficult to protect forms against CSRF if there’s a script in the page which sends the CSRF key to the attacker.

Step 3 is the actual anti-CSRF measure. It’s quite simple, actually – create a key, store it in the session, and require it as a value in form submissions. If the form doesn’t contain the key generated on the previous request, it’s probably not a proper form submission.

A simple protection script

It’s relatively simple to protect a form against CSRF. We first need to generate a key, store it, and put it in the form. In the next request, the script needs to check whether the value was actually in the request or not..

Continue Lendo →

1 de fevereiro de 2012
por gunnar
0 comentários

Ultra Lan

Para quem trabalha com mais de um computador em rede sabe que as vezes é necessário se comunicar com outra pessoa que esta em outro computador e é claro transferir um arquivo ou dez arquivos.

Pensando nisso o SatellaSoft desenvolveu um Software que tem a capacidade de enviar arquivos pela rede, um chat e também um painel com mais alguns recursos extras para facilitar sua vida.

O Software pode ser usando em qualquer lugar, tanto em sua casa como na sua empresa, ele é livre e o melhor de tudo que não exige nada do seu computador.

Muitas pessoas já estão utilizando, agora é a sua vez.

O Software é compatível com qualquer versão Windows.

Confira isso e muito mais no link de Download abaixo.

 

Download: http://www.satellasoft.net/downloads/ultra%20lan.php

12 de janeiro de 2012
por admin
0 comentários

Linux: How to backup hard disk partition table (MBR)

If you don't want to take any chances with your data, it is recommended that you backup hard disk partition table. Last Friday I was discussing some issues with one of our customer and he pointed out me dd command.

Backup MBR with dd command

dd the old good command which now backup partition tables even writes CDs ;) . Backing up partition is nothing but actually backing up MBR (master boot record). The command is as follows for backing up MBR stored on /dev/sdX or /dev/hdX :
# dd if=/dev/sdX of=/tmp/sda-mbr.bin bs=512 count=1

Replace X with actual device name such as /dev/sda.

Now to restore partition table to disk, all you need to do is use dd command:
# dd if=/tmp/sda-mbr.bin of=/dev/sdX bs=1 count=64 skip=446 seek=446

dd command works with Solaris, HP-UX and all other UNIX like operating systems. Read man page of dd for more info.

5 de janeiro de 2012
por admin
0 comentários

Sql é super fácil :)

Vamos ver quem não vai entender SQL agora...

SELECT mulher
FROM balada
WHERE
(geral = ‘LINDA’ OR geral = ‘GOSTOSA’) AND
bunda >= 95 AND
peitos >= 80 AND
idade BETWEEN ‘18′ AND ‘30′ AND
carater = ‘SAFADA’ AND
estado = ‘ESTUDANTE’;
Às 24:00 – ainda não conseguiu ninguém:
SELECT mulher
FROM balada
WHERE
geral = ‘GOSTOSA’ AND
bunda >= 80 AND
peitos >= 70 AND
idade BETWEEN ‘16′ AND ‘35′ AND
carater = ‘MAIS OU MENOS SAFADA’ AND
estado = ‘SEM OCUPAÇÃO’;
Às 01:30 – começando a ficar desesperado:
SELECT mulher
FROM balada
WHERE
geral = ‘AJEITADA’ AND
bunda >= 70 AND
peitos >= 40 AND
idade BETWEEN ‘16′ AND ‘40′
carater IS NULL AND
estado = ‘LARGADA’;
Às 03:00 – já está completamente desesperado:
SELECT mulher
FROM balada
WHERE
geral LIKE ‘&BAGULHO&’ AND
bunda <> 0 AND
peitos <> 0 AND
idade BETWEEN ‘14′ AND ‘50′
estado = ‘EMPREGADA’;
Às 04:00 – na fila para pagar e ir embora:
SELECT mulher
FROM balada;
OBS: em alguns casos, o select é mais simples, algo como:
SELECT * FROM balada;