資源簡介
python的socket代理模塊
安裝方法:解壓后把socks.py文件復制到文件夾C:\Python25\Lib,這里假設你裝的是python2.5
使用方法:
import socks, socket
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "地址", 端口)
socket.socket = socks.socksocket
接下來,你就可以照常使用socket了,一切都會悄悄地通過代理出去的~
使用實例:/viewthread.php?tid=328351&page=1#pid1888884
安裝方法:解壓后把socks.py文件復制到文件夾C:\Python25\Lib,這里假設你裝的是python2.5
使用方法:
import socks, socket
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "地址", 端口)
socket.socket = socks.socksocket
接下來,你就可以照常使用socket了,一切都會悄悄地通過代理出去的~
使用實例:/viewthread.php?tid=328351&page=1#pid1888884
代碼片段和文件信息
“““SocksiPy?-?Python?SOCKS?module.
Version?1.00
Copyright?2006?Dan-Haim.?All?rights?reserved.
Redistribution?and?use?in?source?and?binary?forms?with?or?without?modification
are?permitted?provided?that?the?following?conditions?are?met:
1.?Redistributions?of?source?code?must?retain?the?above?copyright?notice?this
???list?of?conditions?and?the?following?disclaimer.
2.?Redistributions?in?binary?form?must?reproduce?the?above?copyright?notice
???this?list?of?conditions?and?the?following?disclaimer?in?the?documentation
???and/or?other?materials?provided?with?the?distribution.
3.?Neither?the?name?of?Dan?Haim?nor?the?names?of?his?contributors?may?be?used
???to?endorse?or?promote?products?derived?from?this?software?without?specific
???prior?written?permission.
???
THIS?SOFTWARE
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1423??2006-10-20?03:58??LICENSE
?????文件?????????622??2006-10-25?22:54??BUGS
?????文件????????9233??2006-10-25?22:49??README
?????文件???????13785??2006-10-25?22:19??socks.py
評論
共有 條評論