acloudtree

Tag error

(Nerd) Ubuntu 9.10 + installing wireshark

From the command line

sudo apt-get install wireshark

Once the process completes, wireshark will be installed. The only problem is that if you open the wireshark application, there will not be any physical eth(N) devices to sniff. So how do we remedy this?

Open the application ‘Main Menu’

PathToMainMenu

Select wireshark properties

SelectWiresharkProperties

We need to change the command from this
Wireshark

To this
GksudoWireshark

And what is the reason for this? Well the ethernet or wireless devices we are after are owned by root. So if we tack on the gksudo command to the front of the wireshark init command, we are effectively opening wireshark as root. With all the implied responsibilities and permissions, make sense?

(Nerd) Python2.6, Screen scraping, and Javascript cookies

Recently I tried *scraping some data from a website and was running into problems. I don’t have a fix at the moment but I made the first big break through.

My first attempt at scraping the data with Python was met with immediate denial. And I was able to get similar results (though not exact) by disabling cookies in my browser (firefox3.5) and accessing the desired site. The fact that the results were not identical confused me some. But I figured it was a subtle difference in the way Firefox handled the request versus how I was handling the request programmatically with Python, mechanize, urllib2, and cookielib.

Still, after several hours I still was unable to make the desired request to the server. So I started doing some digging. It turns out that these libraries are unable to automatically handle cookies set by Javascript. So, to test this, I disabled Javascript in my browser, made the request, and got the exact same results. YES!!!

As a quick test I was able to extract the cookies’ value using the LiveHeader extension in Firefox. I then took this value and manually assigned it to the header of my Python request. I then got the desired results in my Python program. I’ll post an example of my solution when I get it up and running.

Troubleshooting:

In your browser I would do the following in order to try and recreate what is happening in your program.

  1. Disable Javascript
  2. Disable Cookies
  3. Access headers with Firefox plugin

*Programmatically extracting data from a website

(Nerd) Upgrading eeePC 1005ha Firmware

So I am trying to hack my eeePC in order to make it do…er…stuff. And in the process I realized my firmware was running a little behind. And do you know what happened when I tried to upgrade it? I got an error.

'1005ha.rom' Not Found

And so I took the following steps to fix it.

  1. Renamed my ROM file from 1005HA-ASUS-0703.ROM to 1005HA.ROM
  2. Formatted a thumb drive to FAT32
  3. Copied over the .ROM file into the root directory of the thumb drive
  4. Reboot
  5. Pressed F2 to get into BIOS
  6. Change the boot device priority to make the USB drive the Primary
  7. Went into boot settings and DISABLED ‘quiet boot’ (so that we could see POST info)
  8. DISABLE ‘Boot Booster’
  9. pressed the F10 key and saved my BIOS settings
  10. During POST I pressed Alt+F2

eeePC_Asus_1005ha_firmware_upgrade_picture

It found my renamed .ROM ‘1005ha.rom’ and Viola! All set.

Copyright © Jared Folkins
Programming, Computers, Writing, Economics, and Life

Powered by WordPress