Archive for the ‘linux’ Category

Ubuntu sem som no toshiba

Friday, February 15th, 2008

Demorei pra encontrar a solução, entao vou postar aqui, tenho um toshiba A215-s7422, instalei o ubuntu porem nada de som, solução? google.

1 - Habilitar backports nas fontes de software
( System -> Administration -> Software Sources -> Updates -> Unsupported updates (gutsy-backports) )

2 - Descubra a versao do seu kernel
no terminal digite ‘uname -r’
anote se for 386 ou generic para o proximo passo

3 -  no terminal execute:
sudo aptitude install linux-backports-modules-generic
ou
sudo aptitude install linux-backports-modules-386

4 - sudo vi /etc/modprobe.d/alsa-base
adicione essa linha ao final do arquivo:
options snd-hda-intel model=toshiba

5 - Reinicie

Ajuda para testar sql injection

Thursday, November 8th, 2007

A hackbar é uma extensão para o firefox com funcionalidades que ajudam a fazer um sqlinjection e é claro prevenir.

segundo a proipria:

Simple security audit / Penetration test tool.

# New features
- Show / Hide hotkey [F9]
- Tab sensitive
- Auto load, split and focus when pressing hotkey on a new URL.
- Localized ( English and dutch for now )
- Textarea width set to 100% (removed dragbar)
- Complete code revision (OO based instead of functions)

# In general
This toolbar will help you in testing sql injections, XSS holes and site security. It is NOT a tool for executing standard exploits and it will NOT learn you how to hack a site. Its main purpose is to help a developer do security audits on his code. If you know what your doing, this toolbar will help you do it faster. If you want to learn to find security holes, you can also use this toolbar, but you will probably also need a book, and a lot of google :)
# The advantages are:
- Even the most complicated urls will be readable
- The focus will stay on the textarea, so after executing the url (ctrl+enter) you can just go on typing / testing
- The url in textarea is not affected by redirects.
- I tend to use it as a notepad :) - Usefull tools like on the fly uu/url decoding etc.
- All functions work on the currently selected text.

# Load url ( alt a )
This loads the url of the current page into the textarea.

# Split url ( alt s )
When this button is clicked, the url/text in the textarea will be split into multiple lines using the ? and & character

# Execute ( alt x, ctrl enter )
This will execute the current url in the textarea, i mostly use ctrl+enter

# INT -1 ( alt - )
First select a number in the textarea and press this button, the number will be lowered by 1 and the url will be loaded.

# INT +1 ( alt + )
Again first select a number in the textarea and press this button, 1 will be added to the number and the url will be loaded.

# MD5 Hash ( alt m )
this is a standard hashing method, often used as an encryption method for passwords. It will MD5 hash the currently selected string.

# MySQL CHAR() ( alt y )
If quotes are escaped but you did find an SQL injection thats exploitable, you can use this button to convert lets say:
load_file(’/etc/passwd’) –> load_file(CHAR(47, 101, 116, 99, 47, 112, 97, 115, 115, 119, 100))
Thus omiting the use of quotes to load a file.
You can also use this on
WHERE foo LIKE (’%bar%’) –> WHERE foo LIKE (CHAR(37, 98, 97, 114, 37))

# MsSQL CHAR() ( alt q )
Same story as MySQL CHAR(), MsSQL has a slightly different CHAR syntax
–> WHERE foo LIKE ( CHAR(37) + CHAR(98) + CHAR(97) + CHAR(114) + CHAR(37))

# Base64 encode / decode
Base64 encoding ( UU ) is often used to store data (like a return url etc.) This will help you to read those values.

# URLencode / decode
This will encode or decode the currently selected characters to url safe characters. I mostly use it to end a query with # (%23) when in a pseudo path where i cant use /* or –

Use com cuidado ;-)

Script para backup de Sistema

Thursday, November 8th, 2007

Caros, estou um pouco afastado das atividades do blog devido a um problema com o computador.

Vou postar esse script que estou usando para fazer o bkp da base de dados e dos fontes do sistema.

Segue Download

#!/bin/bash
#———————————————————————————————————#
# Script de Backup de conteudo em Homologação do Portal
# Autor: Taliba Martins
# Óia o autor: talibamartins.com
# Inicio do Projeto 2007-11-06
#—————————————————————————————————-#

# DADOS DE CONEXÃO —————————————————————————-#
MyUSER=”" # nome de usuario do banco
MyPASS=”" # senha do usuario do banco
MyHOST=”" # hostname
MyDB=”" # database

# LINUX PATHS ———————————————————————————–#
MYSQL=”$(which mysql)”
MYSQLDUMP=”$(which mysqldump)”
GZIP=”$(which gzip)”
TAR=”$(which tar)”
MKDIR=”$(which mkdir)”
WGET=”$(which wget)”
FTP=”$(which ftp)”

# VARS GLOBAIS ——————————————————————————–#
NOW=$(date +”%Y-%m-%d”) # data atual
DIR=”/home/diretorio” #Diretorio Principal

# MONTAGEM DE DIRETORIOS E ARQUIVOS BKP ———————————————#
BKPDIR=”$DIR/bkp/$NOW” # diretorio do backup
DBFILE=”$BKPDIR/$NOW_DB.gz” # arquivo BKP do banco
PBFILE=”$BKPDIR/$NOW_PB.tar.bz2″ # arquivo BKP do Publicador
PBD=”/var/www/html/*” # Diretorio www

# BKP EXECUÇÃO ————————————————————————————-#

#Cria o diretorio
if [ -d $BKPDIR ]
then
echo “Diretorio ja existe”
else
echo “Criando Diretorio $BKPDIR ”
$MKDIR $BKPDIR
echo “Diretorio Criado”
fi

#Executa o dump do banco gravando no diretorio.
$MYSQLDUMP -u $MyUSER -h $MyHOST -p$MyPASS $MyDB | $GZIP -9 > $DBFILE

if [ -e $DBFILE ]
then
echo “Se deu bem nessa o arquivo do banco foi criado [ $DBFILE ]”
else
echo “Arquivo do banco não foi gerado”
exit
fi
#Executa o dump do banco gravando no diretorio.
$TAR cjf $PBFILE $PBD

if [ -e $PBFILE ]
then
echo “Se deu bem nessa o arquivo do fonte foi criado [ $PBFILE ]”
else
echo “Arquivos nao foram criados”
exit
fi

[LINUX] - Tilda o Yakuake do Gnome

Wednesday, October 24th, 2007

O Yakuake, como muitos ja devem conhecer, é uma opção Elegante de para utilizar o Konsole do Kde, voce aperta a tecla de atalho F12, e abre um konsole no estilo Quake, ou Counter Strike, lembrando que o Yakuake é para o KDE, mas e o Gnome?

Entao Pesquisei um pouco e descobri o Tilda, um similar, é claro nao é bem um Yakuake, mas quebra o galho alem de ser mais leve e mais facil de configurar nesse caso a tecla de atalho é F1.

Tilda:
Tilda

Utilíssimo ;-)