Host-hopping scripts in Python

Wednesday, 20 August 2003, 2:39 PM EST

I provide telecommute consulting for a company called Crisp Hughes Evans (CHE) in Asheville, North Carolina. They needed a way to download Web logs from Apache, Zope and Plone Web sites, which were developed internally by employees, and Squid Proxy servers, which were running behind firewalls on client LANs that CHE set up. Because CHE believes in minimizing the number of different technologies used, I needed to see if I could download the Web logs reliably without changing the computer environment. Several methods exist to download logs: NFS, SAMBA, HTTP, FTP and so on. But because every computer has SSH installed and running, I decided to test SSH with Expect and my favorite programming language, Python.

What is SSH? SSH is a program used to log in to remote computers and execute commands or to transfer files. SSH also is encrypted. You can find out more information about SSH at www.openSSH.org. I chose SSH because all the computers had SSH, and I was trying to prevent installing new services.

What is Expect? Expect is an interface to automate login sessions of your favorite service (telnet, FTP, SSH and so on). Expect executes commands for you as if it was an interactive login. It can do this because it handles both the input and output when executing the program. In effect, it handles the expected responses of the programs. For example, it could log in as you and change your password for your account.

[ Read more ]




Spotlight

The psychology of phishing

Posted on 23 July 2014.  |  Cybercriminals no longer send out thousands of emails at random hoping to get a handful of hits, today they create highly targeted phishing emails which are tailored to suit their recipients.


Weekly newsletter

Reading our newsletter every Monday will keep you up-to-date with security news.
  



Daily digest

Receive a daily digest of the latest security news.
  

DON'T
MISS

Thu, Jul 24th
    COPYRIGHT 1998-2014 BY HELP NET SECURITY.   // READ OUR PRIVACY POLICY // ABOUT US // ADVERTISE //