Saturday, August 28, 2010

how to use arp spoofing

here i'l try to describe how to do an arp spoofing and sniff the traffic
my main idea is to make my pc pretend to be the router and get the traffic of a specific pc
Operating system used: ubuntu
Software used : arpsppf (dsniff package), and tcpdump

1- download the dsniff package
sudo apt-get dsniff

2- allow forwarding of the traffic so target pc will not fail to communicate
sudo echo 1 > /proc/sys/net/ipv4/ip_forward

3- start arp spoofing to target_ip and pretend to be router_ip
sudo arpsppof -i interfacename -t target_ip router_ip
sudo arpsppof -i wlan0 -t

4- start tcpdump to see traffic
tcpdump -ni wlan0 host

now we get the traffic from the target_ip (

further we can use tools to sniff data
- for chating programs like yahoo and msn use msgsnarf (dsniff package)

and finally:
you shouldn't perform such activities except on networks owned by yourself or you have a written consent by the owner.

Thursday, July 22, 2010

PHP reading from 2 mysql databases with different encoding

I came across a problem of reading data from 2 mySQL databases
one with latin1 encoding and have Arabic char
The other is in UTF encoding and have Arabic Char
the final php page is using UTF encoding
i tried allot and I searched allot for a solution and i came to this solution
i have only one user having access to both databases
code below:
// open database 1
$dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD);
$var_select=mysql_select_db (DB_NAME1);
//first read the data from the latin1
mysql_query("SET NAMES latin1;");
mysql_query("SET CHARACTER_SET latin1;");
mysql_query("SET character_set_client=latin1");
mysql_query("SET character_set_connection=latin1");
mysql_query("SET character_set_database=latin1");
mysql_query("SET character_set_results=latin1");
mysql_query("SET character_set_server=latin1");
$query1="SELECT quesr";
// convert data to utf
$datalatin1=$user=iconv("windows-1256","utf-8", $datalatin1);
//first read the data from the UTF
mysql_query("SET NAMES utf8;");
mysql_query("SET CHARACTER_SET utf8;");
mysql_query("SET character_set_client=utf8");
mysql_query("SET character_set_connection=utf8");
mysql_query("SET character_set_database=utf8");
mysql_query("SET character_set_results=utf8");
mysql_query("SET character_set_server=utf8");
$query="SELECT quesr";
// can use the converted $datalatin1 in the query as it's not UTF

Tuesday, July 20, 2010

Tone's Brush Set Version 2

ound these amazing videos, using Tone's Brush Set Version 2
check them

Tuesday, July 13, 2010

Geolocation API and new service from

"The W3C Geolocation API is an effort by the W3C to standardize an interface to retrieve the geographical location information for a client-side device" information from wikipedia site

a new service from to allow users using devices supporting the geolocation api to add new POIs using their own location.
first you need to register to the site here then you can connect to the site from your mobile and add the information of the POI and it will be saved using you current GPS location

this is tested on:
1- N900 with the built-in web browser and maemo-geolocation extension and
2- Iphone 4 with built-in web browser
3- Samsung Galaxy S / Android 2.2 (Updated 29/11/2010) is a community POIs with categories, ranking, and comments

try it and tell me if it works on your mobile

the web site will ask you to allow it to find your location, so you need to accept it

Monday, July 5, 2010

How DSLR auto mode parameters differs

I always think of the auto modes in my DSLR and how they differs in the mean of parameters (F number, shuter speed, ...)
so i did a quick test using my D90 and if you have time to do it please do it and send me the result
Camera: D90
Lens: Nikon 18-135
Test description: take the same shoot with all the auto modes and compare the parameters

Mode Flash F ISO Shutter
Auto yes 3.5 800 1/60
Portrait yes 3.5 800 1/60
Landscape no 5.6 800 1/8
Close-up yes 5.6 200 1/125
Sports no 3.5 1600 1/30
Night portrait yes 3.5 800 1/15

from the table i see that auto-mode assumed it's a portrait photo

Thursday, May 27, 2010

Configuration error while trying to run nokia update software

I got this problem today while i was trying to update N900
I only have windows 7 and ubuntu , so i cannot check other windows platforms
i searched alot and finally find this solution

goto start menu
type in services and click the top option
sort by name and goto ICS - Internet connection sharing then stop it.
Now try the updater, dont forget to start the service when you're done

Tuesday, May 25, 2010

Aperture, Shutter speed, and Depth of Field

I was always interested in photography, and used to have alot of point and shoot cameras,
finally i got my first DSLR camera.
It's a Nikon D90 and i got 2 lenses (Nikon 135 zoom lens, and Sigma 105 macro lens)
Currently i'm trying to learn alot about it and about photography
3 things that confused me allot and that is why i wanted to write about them and the relation between them

1- Aperture
According to Wikipedia : In aperture is a hole or an opening through which light travels.

The aperture is the size of the “hole” formed by the shutter when it opens to let light in, and is measured in “f-stops.”. A “small” aperture means a small hole, but a big number, like f11 on the right.  Since the hole is smaller, less light gets in with small apertures.  A “big” aperture means a big hole, but a small number, like f2.8 on the left.  Since the hole is bigger, more light gets in with big apertures.
for example of different aperture see image below:

 here is another example:
 as you see the smaller the f number the bigger the aperture the more light goes to sensor

2- Shutter Speed
According to Wikipedia : shutter speed is a common term used to discuss exposure time, the effective length of time a camera's shutter is open.The total exposure is proportional to this exposure time, or duration of light reaching the film or image sensor.
Shutter speeds are measured in more obvious terms: fractions of a second. A shutter speed of 1/8, for example, means that the shutter opens for one-eighth of a second. Try to capture a moving object at that speed and you wind up with a big blur. You need a shutter speed of about 1/500 to capture action clearly.
 On cameras that offer aperture and shutter speed control, you manipulate the two settings in tandem to capture just the right amount of light. For example, if you're capturing fast action on a bright, sunny day, you can combine a fast shutter speed with a small aperture (high f-stop number). To shoot the same picture at twilight, you need a wide-open aperture (small f-stop number) in order to use the same fast shutter speed.

here is an example for controlling exposure:

here is another example controlling movement:

usage of shutter speed values:

3- Depth of Field (DoF)
The Depth of Field is the distance wherein objects are in focus.
The range of depth of field (DOF) varies with focal length, aperture size and distance from the camera to the focus point.

here is an example of relation of aperture and DoF:

At last:
For a shallow depth of field:
  • Set the aperature value as low as possible.
  • Get as close to the primary subject as possible.
  • You'll need lots of light.
  • You may have to increase the ISO setting.
For maximize the depth of field:
  • Set the aperature value as high as possible.
  • The farther away you are the greater the depth of field.
  • A longer exposure will maximize the depth of field; you may need a tripod, or other steady surface for your camera.

Nikon D3000 10.2MP Digital SLR Camera with 18-55mm f/3.5-5.6G AF-S DX VR Nikkor Zoom Lens
Nikon D5000 12.3 MP DX Digital SLR Camera with 18-55mm f/3.5-5.6G VR Lens and 2.7-inch Vari-angle LCDNikon D300s 12MP CMOS Digital SLR Camera (Body Only)

The N900 Finally Gets The PR 1.2 Firmware

While checking the internet today, i found that The much awaited PR 1.2 (V10.2010.19-1) Firmware for the N900 is finally available for those of you in the UK, the rest of us will be blessed with this much awaited update tomorrow (OTA) i.e. Wednesday. The update brings a ton of bug fixes (literally), faster performance, inbuilt Qt libraries so you can gear up for some tempting applications, changes to the way the application display is handled and support for paid apps from the Ovi Store. Oh and there is support for Skype video calls as well.

The N900 Finally Gets The PR 1.2 Firmware
The update is available OTA in the UK, but if you want to flash your device to get a fresh start, grab the firmware images from here. The paid apps and the new version of the Ovi Store will be switched on later this week (Thursday) when most people have updated to the new firmware. It will not function on PR 1.1 so you will have to update to benefit, expect to see Jurassic 3D Rollercoaster, Zen-bound, Angry Birds (level pack), Sygic, Kroll, Weatherbug, and GoGadget.
  • Longpress to enter numbers/symbols on the keyboard.
  • A revamped virtual keyboard.
  • The ability to rearrange icons,  no ‘more’ button in the menu.
  • Changes to the camera UI, and a night mode for both photos and video.
  • Qt 4.6.2 is now pre-installed.
  • Video in Skype and Google Talk.
  • The web browser now features a button to activate the portrait mode and a few more option while in the portrait mode.
  • The browser benchmark also seems to have shot up from 8687 to 10141 with this leaked release.
  • USSD codes now work.
  • Type to search for apps in the Application Manager.
  • Another addition is an email widget as well for the desktop.
  • Updates to the Ovi Maps application, but no voice navigation yet.
The available firmware images include:
  • RX-51_2009SE_10.2010.19-1.002_PR_COMBINED_002_ARM.bin 187852797 PR 1.2 version 10.2010.19-1 Latest Maemo 5 USA release for Nokia N900
  • RX-51_2009SE_10.2010.19-1.003_PR_COMBINED_003_ARM.bin 187852797 PR 1.2 version 10.2010.19-1 Latest Maemo 5 Middle East and North Africa release for Nokia N900
  • RX-51_2009SE_10.2010.19-1.004_PR_COMBINED_004_ARM.bin 187590653 PR 1.2 version 10.2010.19-1 Latest Maemo 5 India release for Nokia N900
  • RX-51_2009SE_10.2010.19-1_PR_COMBINED_MR0_ARM.bin 187721717 PR 1.2 version 10.2010.19-1 Latest Maemo 5 Global release for Nokia N900
So if you do not want to wait until tomorrow, simply grab the vanilla version for PR 1.2 for your region and get flashing. Use this guide. If you notice there is a specific ‘India’ release, so you can expect the device to hit India anytime now.

original post here

Thursday, April 1, 2010

Meego now available for Download for Nokia N900

At last for all N900 users that was worried that Meego will not be available for N900,
The much awaited Meego release for Nokia N900 is officially released today.
This is a developer release.
The Meego Wiki for ARM published three types of installation of Meego on your Nokia N900.

you can download it from Here.

Wednesday, March 17, 2010

Use Aircrack-ng to test wireless WEP on ubuntu

i use ubuntu 9.10 and HP dv6000 laptop
the wireless card is
Intel Corporation PRO/Wireless 3945ABG
first install aircrack-ng
sudo apt-get install aircrack-ng
check your card is compatible with aircrack here
mine is already included in kernel 2.6.24 and injection is in kernel 2.6.25 or later
my kernel is 2.6.31 so i dont need to do anything

here is the getting started tutorial

this is what i did to test my network
1- Start the wireless interface in monitor mode on AP channel
sudo airmon-ng start eth1
the output
Found 5 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!
PID Name
988 avahi-daemon
989 avahi-daemon
1066 NetworkManager
1361 wpa_supplicant
32735 dhclient
Process with PID 32735 (dhclient) is running on interface eth1
Interface Chipset Driver
eth1 Intel 3945ABG iwl3945 - [phy0]
(monitor mode enabled on mon2)
mon0 Intel 3945ABG iwl3945 - [phy0]
mon1 Intel 3945ABG iwl3945 - [phy0]

2- Test Wireless Device Packet Injection
sudo aireplay-ng -9 -e netwrok_name mon0

3- Start airodump-ng to capture the IVs
in a new shell
sudo airodump-ng -c channel_id --bssid accesspoint_mac -w output mon0

4- Use aireplay-ng to do a fake authentication with the access point
in a new shell
sudo aireplay-ng -1 6000 -o 1 -q 10 -e netwrok_name -a accesspoint_mac -h laptop_mac mon0

5- Start aireplay-ng in ARP request replay mode
in a new shell
sudo aireplay-ng -3 -b accesspoint_mac -h laptop_mac mon0

wait until you got some ARP requests (this may take some time)

6- Run aircrack-ng to obtain the WEP key
in a new shell
sudo aircrack-ng -b accesspoint_mac output*.cap

after some time (depends on the key) you will get the key

Thursday, February 25, 2010

not enough space problem while upgrading N900

I've write before about the new minor update N900 had here
I tried to install it, and i always have a problem regarding not enough space on device
here is what i did to make it work
1- reboot the device from the shell (open shell, run root, run reboot)
2- removed unused widgets
3- disabled the extra, and testing repository from the application manager

after that i could update the device
i did not see any new addition
also i think that point 3 is the solution

hope to hear from you all if you have problem and how you solved it

Wednesday, February 17, 2010

Minor Firmware Update (3.2010.02-8) For Nokia N900 Now Available!

The Nokia N900 received an update Tuesday morning to version 3.2010.02-8.
The software update is available through the app manager so go ahead and check your N900.

here is the Original post in maemo freak

Thursday, January 28, 2010

writting Helloworld example for Maemo 5 and run it on SDK and N900

here is the steps i did to write the famous Helloworld first example for maemo 5
compile it and test it in the SDK and finally compile it to run in N900
The original post is here

1- install Maemo 5 SDK from here
2- open terminal and run
Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb &
3- open another terminal and run
this is where you do all the coming steps
4- you should be working in the home
[sbox-FREMANTLE_ARMEL: ~] >pwd
5-[sbox-FREMANTLE_ARMEL: ~] >vi helloworld.c
and add the following code:
#include  /* printf */
int main(int argc, char** argv) {
printf("Hello world\n");
return 0;

6- to test the code in the SDK you need to compile for PC this is done by
[sbox-FREMANTLE_ARMEL: ~] >sb-menu
choose "select" then "FREMANTLE_X86" then "OK"
7- [sbox-FREMANTLE_X86: ~] > gcc -Wall -g helloworld.c -o helloworld
8- [sbox-FREMANTLE_X86: ~] > ./helloworld
it will give you
Hello world

9- Now lets compile it for N900
10-[sbox-FREMANTLE_ARMEL: ~] >sb-menu
choose "select" then "FREMANTLE_ARMEL" then "OK"
if it complains from running process choose "killall" and try again
11-[sbox-FREMANTLE_X86: ~] > gcc -Wall -g helloworld.c -o helloworld
12- connect N900 as storage
13- copy the file helloworld to the N900
14- disconnect the N900 from the PC
15- open shell
16- type root
17- move the helloworld to the home of the root
18- add execute to the Helloworld file (chmod +x helloworld)
19- run it (./helloworld) you should get
Hello world

and that it i finished the first example

N900 battery not charging after completely discharge

i noticed that if i leave my N900 battery to discharge completely
then i try to charge it, it may not charge
a friend of mine faced this too and i found that people in internet faced the same problem

here is what you can do

- leave it connected to wall charge for some time (10-15 minutes) then try to start it again
- disconnect the charger, then remove the battery for a minute or two, reinsert the battery, connect the charge and try to start it

so my recommendation

never discharge N900 battery completely

Tuesday, January 26, 2010

installing and tesgting Maemo 5 SDK

Here is how i installed Maemo 5 SDK in Ubuntu
the main documentation is here

1- Installing the X-server
sudo apt-get install xserver-xephyr
2- Installing the SDK

i used the GUI installed method
chmod a+x
sudo ./

3- Starting the SDK
- open terminal and run
Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb &
- open another terminal and run

if you got error regarding permissions, just log off then log in again

4- Testing the SDK
use the test here

Tuesday, January 5, 2010

facebook messages about BINSSERVICESONLINE .INFO

i keep getting messages from friends about this web site
it seems either a spam or a virus

here is a sample of two messages
"hey what's up? was just chatting with Abdulla and they asked me if you know about BINSSERVICESONLINE .INFO or not"

"Abdallah mentioned you might be interested in this BINSSERVICESSTORE .INFO"

if anyone have more info please add it here

thank you