Distributed Hash Tables, Part I
Listing 6. portscan.py
def __main__(): id=int(random.uniform(0,2**k)) node=Node(id) join(node, initialContact) line=raw_input('Enter an IP to scan: ').trim() key=long(sha.new(line).hexdigest(),16) value=lookup(node, key) if value==None: f=os.popen('nmap '+args) lines=f.readlines() value=string.join(lines, '\n') store(node, key, value)
In this installment of our two-part series, we discussed the theory behind building DHTs. Next time, we'll talk about practical issues in using DHTs in real-world applications.
Brandon Wiley is a peer-to-peer hacker and current president of the Foundation for Decentralization Research, a nonprofit corporation empowering people through technology. He can be contacted at firstname.lastname@example.org.
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
|Trying to Tame the Tablet||May 08, 2013|
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- New Products
- The Pari Package On Linux
- Home, My Backup Data Center
- Developer Poll
- This is the easiest tutorial
3 hours 32 min ago
- Ahh, the Koolaid.
9 hours 10 min ago
- git-annex assistant
15 hours 10 min ago
- direct cable connection
15 hours 33 min ago
- Agreed on AirDroid. With my
15 hours 43 min ago
- I just learned this
15 hours 47 min ago
16 hours 17 min ago
- not living upto the mobile revolution
19 hours 8 min ago
- Deceptive Advertising and
19 hours 44 min ago
- Let\'s declare that you have
19 hours 45 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.