Suramya's Blog : Welcome to my crazy life…

February 2, 2010

Exorcising my Dad’s HP dv5000 Laptop by dismantling it

Filed under: Computer Hardware,My Life,Tech Related — Suramya @ 10:35 PM

A few days ago dad’s HP Pavilion dv5000 started acting funny. He had put the laptop in hibernation but all of a sudden it would start up on its own for a few seconds and then would shut down due to low battery. This woke him up so he brought the laptop to my room so that I could take a look at it. I looked at it but didn’t find anything funny so I shutdown the system and told him that I would take a look at it in the morning.

A few minutes later the laptop started up again even though I had shut it down completely. I then removed the battery and left the AC Adapter plugged in to see if the problem was caused due to a faulty battery. But the laptop still started up again without anyone touching it. So I decided to take the laptop apart to see if there was a loose connection or something that was triggering the boot.

This laptop is designed in a way to make it really hard to open without knowing exactly where all the screws are located. Some of them are hidden behind other items like the Harddrive and the DVD-ROM, some are on the other side so you only see them when you remove the DVD Drive and look under the laptop again. It took me a couple of hours to get it all open.

The photos posted by Chris Davis on his flicker account helped a lot in getting the stupid laptop open. Thanks Chris. I owe you a beer.

Compared to this my Sony Vaio had taken me about 1/2 hour to open. The worst part is even simple stuff like resetting the BIOS by removing the battery require you to dismantle pretty much the entire laptop. I think this is an issue with all HP systems because I remember trying to upgrade the RAM on a HP desktop and that took us most of the day (this was back in 2006 I think)

Anyways once I managed to open the laptop, I cleaned it and put it back together. Since then the laptop hasn’t started up on its own again (so far) so I guess we are good for now. Dad’s happy that the laptop stays shutdown when he turns it off and I don’t have to take it to a hardware repair shop to get it fixed which would have been a pain.

The next item on my repair list is my N95. I think I need to update the firmware on it but before that I will have to backup all the SMS’s, logs, etc etc on it. Plus all the programs I have installed. So that’s a task for another day.

– Suramya

January 20, 2010

List all machines connected to a LAN with additional details on each

Filed under: Knowledgebase,Security Tools,Tech Related — Suramya @ 12:15 AM

If you ever had to figure out how many systems are connected to a network and what IP’s they have then you will find this tip useful. It is also useful to identify any rouge machines on your network if you know how many systems are supposed to be there on that network. Like in case of my home network, where I know the exact no of machines.

There are multiple software out that, that allow you to do this. Some are free, some are very expensive. In my opinion the best one is nmap. It is free, fast and can be scripted.

To find all machines on my LAN (IP Range: 192.168.2.x) I just have to issue the following command:

nmap -sP 192.168.2.0/24

This gives an output like the following when I run it as a normal user:

suramya@Wyrm:~$ nmap -sP 192.168.2.0/24

Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-20 00:01 IST
Host 192.168.2.1 is up (0.0018s latency).
Host 192.168.2.5 is up (0.00018s latency).
Host 192.168.2.100 is up (0.00018s latency).
Nmap done: 256 IP addresses (3 hosts up) scanned in 2.93 seconds

When I run the same command as root, it gives me additional information that looks like:

Wyrm:~# nmap -sP 192.168.2.0/24
Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-19 23:50 IST
Host 192.168.2.1 is up (0.0015s latency).
MAC Address: 00:XX:XX:XX:XX:XX (Cisco-Linksys)
Host 192.168.2.5 is up.
Host 192.168.2.100 is up (0.011s latency).
MAC Address: 00:XX:XX:XX:XX:XX (Intel)
Nmap done: 256 IP addresses (3 hosts up) scanned in 3.00 seconds

In this case, as you can see nmap also gives me the MAC address of the machine. 192.168.2.5 is the machine I ran the scan from so I didn’t get any information on that one.

If you want additional details on a system you can issue the following command to get the system to try and identify the OS and services running in detail.

nmap -A 192.168.2.5

It gives an output that looks something like:

Wyrm:~# nmap -A 192.168.2.5
Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-19 23:52 IST
Interesting ports on 192.168.2.5:
Not shown: 995 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 5.1p1 Debian 8 (protocol 2.0)
| ssh-hostkey: 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx (DSA)
|_ 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx (RSA)
80/tcp open http Apache httpd 2.2.14 ((Debian))
|_ html-title: Index of /
139/tcp open netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
445/tcp open netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
631/tcp open ipp CUPS 1.4
Device type: general purpose
Running: Linux 2.6.X
OS details: Linux 2.6.17 – 2.6.28
Network Distance: 0 hops
Service Info: OS: Linux

Host script results:
additional information on the server

Hope you also find this useful.

– Suramya

January 19, 2010

Flaw gives AT&T users access to other user’s Facebook accounts

Filed under: Computer Security,My Thoughts,Tech Related — Suramya @ 11:23 PM

Recently a Georgia mother and her two daughters logged onto Facebook from their mobile phones and wound up in a strangers’ accounts with full access to their private information. All of them were using AT&T as their data provider. On the face of it, it seems pretty scary.

How prevalent this flaw is and what other services are affected is something that is still unknown. As far as I can tell no technical details have been released to explain this issue either by Facebook or AT&T. So I am going to speculate on various ways this might have happened.

1. A flaw in Facebook caused the system to falsely authenticate users based on their IP address even without an authentication cookie present.

This could happen, however if this was the case a lot more people would have hit it by now especially on networks that have their IP address allocated dynamically.

So Probability of this being the reason: Very Low

2. AT&T is using a proxy caching server and the authentication cookies used by Facebook was stored on the proxy server.

If a proxy server was being used by AT&T then when a request went out to Facebook it would check for a valid session using the server’s IP address and then check for an authentication cookie on that server. If one existed the user would then be authenticated even though this time someone else was trying to access their Facebook account.

The problem in this case would be the incorrect configuration of their Proxy server by AT&T.

So Probability of this being the reason: Very High

3. Can’t think of any other reason… Though there could be a ton of other explanations. Just can’t think of any of them right now.

Caching servers are well and good but if they are not correctly configured they have the capacity of causing a lot of havoc and security issues. So I am off to read up more about proxies and caching servers and how to configure them correctly.

Source:

FOXNews.com – Network Flaw Causes Scary Web Error.

– Suramya

December 27, 2009

Stop Gnome Applications from looking ugly in KDE4

Filed under: Knowledgebase,Linux/Unix Related,Tech Related — Suramya @ 3:28 AM

Since I have been using KDE (even in v3.5) I have noticed that Gnome applications look ugly in KDE. (see screenshot below) In KDE 3.5 I had to install the Gnome theme controller application and apply a theme and it fixed the issue. (I can’t recall the name right now, but it was something gnome-theme-something) but in KDE4 that didn’t work so well.


Firefox without GTK Themes

Did a little research and tried various options but none of them worked that well and caused loads of issues. Finally I found a way to get the applications to use the current GTK theme in KDE even after I rebooted the system without any manual intervention.

  • Open a shell prompt or open the Run dialog by pressing Alt-F2
  • Type gnome-settings-daemon and press enter
  • Once you do this all running GTK applications, as well as any more you launch, will switch to your GNOME theme and will look a lot nicer (See screenshot below)


    Firefox with GTK Themes

    As you can see the program looks a lot less ugly with the themes applied. However if you reboot the system without configuring the gnome-settings-daemon to auto start, the applications will go back to the default no-theme state.

    To set the daemon to autostart create a text file called theme.desktop (Actually This can be anything you want as long as you keep the .desktop extension) in the ~/.kde/Autostart directory with the following contents:

    [Desktop Entry]
    Exec=gnome-settings-daemon &
    Name=GNOME Settings Daemon
    Type=Service
    X-KDE-StartupNotify=false
    OnlyShowIn=KDE;

    Once you create the file and save it, KDE will start the Gnome settings daemon everytime it starts.

    Note: On some systems the autostart directory is located in the ~/.kde4/share/autostart folder.

    Hope this helps.

    Source of the tip: Tombuntu.com

    – Suramya

    December 22, 2009

    Finally sync’d my Phone to my Google Calender

    Filed under: My Life,My Thoughts,Tech Related — Suramya @ 3:54 PM

    After reading Vinit’s response to my post about Google Calender Notification (and talking to him) I finally went ahead and installed Mail for Exchange on my N95.

    The configuration was easy, however the interface I got and the settings the system requested were different than what the Google Help site showed. Initially when I was setting up the profile it only asked for my username and password and the domain (which it didn’t let me leave blank as the Google site recommended).

    After I saved this info and tried to exit from the configuration screen that’s when it told me that I hadn’t filled out all the required information and asked me for the remaining information (like the exchange server name etc)

    Once all that was done, I initiated a sync. Even though I had told it to sync calender entries and included events up to two weeks ago it didn’t sync all my events. So I told the system to sync all calender events and that’s when it downloaded all my entries from the Google calender to my local phone.

    The only problem I see is that the events that my phone got from the Google calender don’t have any alarm set for them even though I have an alert set up on the calender for them. Though this could be because I only have the SMS and email alerts configured on all my events but not the pop-up alert. Maybe setting that alarm also will give me a phone alarm. But its not that big a deal.

    Now I have to sit and clean up all the double entries I have ended up on my phone and calender for the same events… Basically on my phone I had the alert configured for a different time than the alert on the calender so I have to sit and clean that out. Will do it when I have some spare time when I am not doing anything…

    Well this is all for now. Will post more later.

    – Suramya

    December 18, 2009

    Google adds Text to Speech capability to its translation service

    Filed under: Interesting Sites,My Thoughts,Tech Related — Suramya @ 12:01 AM

    While surfing the net I discovered that Google has a service that reads out text, converting it to speech so I tried it out and it works great, the voice doesn’t sound robotic at all like some of the other converters that are available today. The best part is that you can use it by passing it a sentence as part of a URL and it will return a mp3 file with the voice over.

    For example, visiting the following link will cause it to read out “Hello and welcome”: http://www.google.com/translate_tts?q=Hello+and+welcome

    Try it out. To have it read out a different text just change the text after ‘q=’ with your own text, replacing the spaces in the sentence with a + sign.

    The only other Text To Speech service I have seen that does this good work is the AT&T Labs Natural Voices site.

    The advantage of the Google service is that it can be automated and can be used within scripts and other programs to generate natural sounding voice responses.

    Source: blogoscoped.com

    – Suramya

    December 11, 2009

    Google Calendar Notifications/Issues

    Filed under: Computer Software,Tech Related — Suramya @ 4:12 AM

    Google recently made a change to its Calender service that I had been waiting for a long time. Actually they might have launched it a while ago but I only noticed it recently.

    You now have the ability to send the reminder for an event to a mobile phone as a SMS. The best part is that it even works with my cell phone in India. So now I get reminders even when I don’t have access to my email (which I admit is pretty rare).

    The only issue I have found so far is that the reminder via SMS is set about a day before the event no matter what setting I put in the interface. I have set the system so that I get a reminder 15 mins before any appointment set in my calender but I keep getting the reminder a day before, i.e. if the event is on the 8th I get the reminder on my cell phone on the 7th. Hopefully they will fix it soon.

    The other issue I hit on the calender is that it seems to be impossible to change the date for an existing event. I wanted to change the date and time for a reminder but it refused to let me change the date. It did change the time to the new time but kept the event on the old date. I finally had to delete the old event and create a new event.

    Now if I can get it to sync with my Phone it would be great. I got the phone to sync with my system but still need to get Google to sync to evolution. (The connection keeps timing out for some reason).

    Other than these minor issues I really like the Google Calender.

    – Suramya

    September 15, 2009

    How to crash Windows 7

    Filed under: My Thoughts,Tech Related — Suramya @ 1:59 PM

    I found an easy way to crash Windows 7 RC 2 when working on Gaurang’s computer. He has VMWare installed on his computer that is currently running Ubuntu so that he can learn Linux. We were playing around with it by trying to see if we could connect to it over the network using VNC.

    First we ran the VNC server on the Linux instance and then connected to it from Windows using the VNC client and it worked great. Then we enabled Remote Desktop on Windows 7 and tried to connect to it from the virtual linux computer on the same system. Basically we were remote desktoping to the the same computer. As soon as I ran the command from the Linux system the entire windows OS crashed and I got the Blue Screen Of Death!

    This is not good. There is no way that a remote desktop look like this one should crash the OS, at the worst it should have crashed that process (VMWare)…

    Found it interesting that a small thing like this can crash the entire OS.

    – Suramya

    September 3, 2009

    Sort a file list by Date in Linux (Including Subdirectories)

    Filed under: Computer Tips,Linux/Unix Related,Tech Related — Suramya @ 7:35 PM

    I use Amarok to play music and I really like it, however my Playlist was created in Winamp/XMMS which I initially thought that Amarok couldn’t read. So all the new music I got since I switched to Amarok was no longer being added to a playlist, I just added the new songs manually then used the select 50 random songs option to play music.

    Yesterday I figured out that Amarok does indeed read .m3u files (Winamp Play lists) so I wanted to add all the new music I have to the top of the old playlist. So basically I needed a list of all music in my system sorted by date. If you have been using Linux and are reasonably familiar with it then I think the first thing that came to your mind must have been: “Why can’t we just use ls -lRrt”? That’s pretty much what I thought. But unfortunately this command doesn’t work very well for what I wanted to do.

    After playing around for a while I finally managed to get the system to show me a list of all music files in my system sorted in reverse chronological order. The command I used for this is:

    find -name "*.mp3" -print0 | xargs -0 stat --format '%Y %n'|sort -r

    Now the explanation:

    • find -name “*.mp3” : returns a list of all mp3 files in the current directory and any subdirectory under it.
    • -print0: This tells find to use the ASCII NUL character instead of space to separate the filenames. If we don’t use this then xargs chokes on the spaces in file names.
    • xargs -0: This tells xargs to use the ASCII NUL character instead of space to separate the filenames.
    • stat –format ‘%Y %n’: This runs the stat command on every file returned by find. This command returns the Time of last modification as seconds since Epoch followed by the name of the file.

      e.g.

      suramya@Wyrm:~$ stat --format '%Y %n' unison.log
      1251802152 unison.log

    • sort -r: sorts the list using the first column (the creation time) and displays the result.

    ——-

    Example execution result in my Scripts directory:

    suramya@Wyrm:~/bin$ ls -l
    total 2648
    -rwx------ 1 suramya suramya      77 2009-01-10 04:30 bookfixer.sh
    -rwx------ 1 suramya suramya      76 2009-01-10 04:30 cardDesigner.sh
    -rwx------ 1 suramya suramya     548 2009-01-10 04:30 change_wan.sh
    -rwx------ 1 suramya suramya     478 2009-01-10 04:30 compare_entire_dir.sh
    -rwx------ 1 suramya suramya    3462 2009-01-10 04:30 delay.pl
    -rwx------ 1 suramya suramya      66 2009-01-10 04:30 EditPlus
    -rwx------ 1 suramya suramya      88 2009-01-10 04:30 export_xterm
    -rwx------ 1 suramya suramya     203 2009-01-30 04:29 extract.sh
    -rwx------ 1 suramya suramya   82558 2009-01-10 04:30 lit2html
    -rwx------ 1 suramya suramya     320 2009-01-10 04:30 makedir.sh
    -rwx------ 1 suramya suramya      49 2009-01-10 04:30 mapsql
    -rwx------ 1 suramya suramya     369 2009-01-15 02:11 MuteUnmute.sh
    -rwx------ 1 suramya suramya 2350194 2009-01-10 04:30 pdftohtml
    drwx------ 2 suramya suramya    4096 2009-01-10 04:30 Poet
    drwx------ 2 suramya suramya    4096 2009-01-10 04:30 Remote
    -rwx------ 1 suramya suramya     109 2009-02-08 19:47 resize.sh
    -rwx------ 1 suramya suramya      48 2009-01-10 04:30 rootscan
    -rwx------ 1 suramya suramya     397 2009-01-10 04:30 S41firewall
    -rwx------ 1 suramya suramya     111 2009-02-21 20:15 sync_website.sh
    -rwx------ 1 suramya suramya     116 2009-01-10 04:30 text2img
    -rwx------ 1 suramya suramya     122 2009-01-10 04:30 uncompress.sh
    -rwx------ 1 suramya suramya  180580 2009-01-10 04:30 vcdgear
    


    suramya@Wyrm:~/bin$ find -name "*" -print0 | xargs -0 stat --format '%Y %n'|sort -r
    1235227520 ./sync_website.sh
    1235227520 .
    1234102660 ./resize.sh
    1233269990 ./extract.sh
    1231965676 ./MuteUnmute.sh
    1231542033 ./vcdgear
    1231542033 ./uncompress.sh
    1231542033 ./text2img
    1231542033 ./S41firewall
    1231542033 ./rootscan
    1231542033 ./Remote/StarFlight
    1231542033 ./Remote/Firestorm
    1231542033 ./Remote/CyberNibble
    1231542033 ./Remote
    1231542033 ./Poet/poet.tar.gz
    1231542033 ./Poet
    1231542033 ./pdftohtml
    1231542033 ./mapsql
    1231542033 ./makedir.sh
    1231542033 ./lit2html
    1231542033 ./export_xterm
    1231542033 ./EditPlus
    1231542033 ./delay.pl
    1231542033 ./compare_entire_dir.sh
    1231542033 ./change_wan.sh
    1231542033 ./cardDesigner.sh
    1231542033 ./bookfixer.sh

    As you can see, the ‘sync_website.sh’ script is the latest script in that directory.

    Hope you find it useful.

    – Suramya

    August 15, 2009

    Posting to WordPress Blogs from Lifeblog on Nokia Phones

    Filed under: Computer Software,Software Releases,Tech Related — Suramya @ 4:45 AM

    I have been wanting to have the option to make blog posts directly from lifeblog on my N95 for a while now but so far was unsuccessful because no plugin existed that worked with the latest version of WordPress.

    So I downloaded the latest available copy of the plugin from this blog post and modified it to work with the latest version of WordPress.

    You can download the latest version of the plugin from the Scripts Directory. This version works with WordPress 2.8.x (I tested it with 2.8.2 and 2.8.4).

    Changelog :
    Ver 3.5: (15th Aug 2009):

    * Plugin is now compatible with WordPress 2.8.x (Tested upto 2.8.4)
    * Replaced the SQL queries for categories creation/check with WordPress Functions
    * Replaced the SQL queries for user checks with WordPress functions
    * Added ability to Enable/Disable Debug Logging by changing one variable

    Let me know if you have any questions/issues.

    – Suramya

    « Newer PostsOlder Posts »

    Powered by WordPress