BetaONE will rise again!


 
Prev Previous Post   Next Post Next
  #1  
Old 16th Dec 04, 11:22 PM
HotRod HotRod is offline
Senior Member
 
Join Date: Jul 2001
Location: Jersey
Posts: 285
HotRod is an unknown quantity at this point
Send a message via ICQ to HotRod
Tiny P2P
_http://www.freedom-to-tinker.com/tinyp2p.html

Code:
TinyP2P is a functional peer-to-peer file sharing application, written in fifteen lines of code, in the Python programming language. I wrote TinyP2P to illustrate the difficulty of regulating peer-to-peer applications. Peer-to-peer apps can be very simple, and any moderately skilled programmer can write one, so attempts to ban their creation would be fruitless.
Code:
# tinyp2p.py 1.0 (documentation at http://freedom-to-tinker.com/tinyp2p.html) import sys, os, SimpleXMLRPCServer, xmlrpclib, re, hmac # (C) 2004, E.W. Felten ar,pw,res = (sys.argv,lambda u:hmac.new(sys.argv[1],u).hexdigest(),re.search) pxy,xs = (xmlrpclib.ServerProxy,SimpleXMLRPCServer.SimpleXMLRPCServer) def ls(p=""):return filter(lambda n:(p=="")or res(p,n),os.listdir(os.getcwd())) if ar[2]!="client": # license: http://creativecommons.org/licenses/by-nc-sa/2.0 myU,prs,srv = ("http://"+ar[3]+":"+ar[4], ar[5:],lambda x:x.serve_forever()) def pr(x=[]): return ([(y in prs) or prs.append(y) for y in x] or 1) and prs def c(n): return ((lambda f: (f.read(), f.close()))(file(n)))[0] f=lambda p,n,a:(p==pw(myU))and(((n==0)and pr(a))or((n==1)and [ls(a)])or c(a)) def aug(u): return ((u==myU) and pr()) or pr(pxy(u).f(pw(u),0,pr([myU]))) pr() and [aug(s) for s in aug(pr()[0])] (lambda sv:sv.register_function(f,"f") or srv(sv))(xs((ar[3],int(ar[4])))) for url in pxy(ar[3]).f(pw(ar[3]),0,[]): for fn in filter(lambda n:not n in ls(), (pxy(url).f(pw(url),1,ar[4]))[0]): (lambda fi:fi.write(pxy(url).f(pw(url),2,fn)) or fi.close())(file(fn,"wc"))
Can some one explain how to get this to run?
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
US Supreme Court to Hear P2P Case NewsBot NeoWin News 0 11th Dec 04 06:00 PM
P2P interfering w/ DSL - anyone had this problem? AnneJay Software Support 6 27th Nov 04 07:05 PM
Movie biz to sue P2P film-sharers NewsBot NeoWin News 0 5th Nov 04 12:00 PM


All times are GMT +1. The time now is 07:04 PM.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.