Workflow of the BlackBox System and Connecting in Two Steps (Python+SSH)

If you have been following this blog you probably knew that this post was coming. I have been able to use SSH and Python together with some dependencies. These dependencies are Paramiko from http://www.lag.net/paramiko/ and a python sript (which I had to edit more on that later) which was written by Zeth from  http://commandline.org.uk.

In this short time using python let me say that it is a very organic programming language that should bring happiness to all programmer that have been muddling with other scripting languages. Saying that let’s go back to business.

Because I changed from Telnet to SSH some things had to change. A new design frenzy ensued. And the result was as below.

connectionsteps

connectionsteps

Please click on the image above to see it more clearly.

So let my explain the above flow step by step.

Continue reading

Fork me on GitHub

Knowing when to fold ( i.e. SSH is better than Telnet )

You have probably seen my  previous post on connecting to Telnet through PHP although it was a novel idea I have just learned that (from a Novell site. No pun intended.) Telnet is very insecure!! To make things clearer Telnet usually creates connections as below;

Telnet-Client-server-unencrypted

Up here you can see a hacker can sniff the client-server connection and actually steal the user name and password sent by client. This really won’t do since if someone can spoof/hack/attack our embedded system which we will be adding to home appliances things may go awry. i.e. you will start seeing automated vacuum cleaners attacking your cat. ( Statistics show that H4X0Rz hate cats. )

Hence we can clearly see we need another way for the server and client to talk to each other. After some short Googling I am thinking of using SSH which is native to Linux/Unix based systems. Where the connection will be as below ;

SSH-client-server-encryptedAs you can see the SSH encryption creates a safer environment for the client and the server plus any DNS attacks and eavesdropping is clearly impossible. (if not probable.)

Henceforth a new PHP and Python (this time I will write the server+client in Python) shall be written. Please expect updates.

Connecting to PHP using telnet and sending data to the same port using Java

Hi there! Have been busy busy busy. What I needed was a way to the following;
Very Simple LayoutAbove you are looking at a very simple layout. ( Almost childishly simple ) The embedded device has Linux installed with a supposedly very light JVM ( Java Virtual Machine ) So if I am to send data to and from the server and display it to the user I have to do some scripting both in Java and in PHP. Let us first take a look at our universal Java-Socket program which basically opens and listens to a certain port (socket );

Continue reading

Giving Small Robots New Ways to Move (IEEE)

I always thought that there should be smaller robots. We do have the technology. Look at your PDAs,IPhones and HTC model telephones. All are actually sophisticated computers. Why not use this technology to make smaller bots? And while making them smaller why not make the so they can move easily through. After all a cockroach can go to places where you would usually say “How in the hell did it get up there?”.

Continue reading

Installed Fedora 11 on Compaq Presario CQ50 (Dual-boot/Vista)

Fedora 11

Fedora. My first love in linux started with Fedora and now I realized this love was not because of some novelty. It was actually because it is easier to use.(As a developer.) So I simply installed Fedora 11 over Ubuntu 9.04 it worked like a charm tough I had to do couple of tweaks. The first tweak was the adding the recovery hard-disk of Vista to the boot menu. No problem there just a simple grub.conf editing was done as below ;

Continue reading