|
|
BBFish
銀驢友〔高級〕
藍色蝴蝶
. 積分: 998
. 文章: 397
. 收花: 9647 支
. 送花: 661 支
. 比例: 0.07
. 在線: 1062 小時
. 瀏覽: 4810 頁
. 註冊: 7329 天
. 失蹤: 815 天
|
|
|
|
|
|
|
#2 : 2008-3-28 09:27 PM
只看本作者
|
送花
(0)
送出中...
|
|
|
freegrap可以喔,去載新的腳本就好了or用下面也行,呵呵。
---------------------------
MODULE_NAME = "zshare"
MODULE_VERSION = "0.0.7"
MODULE_REQUIRE_VERSION = "1.2.3.4"
MODULE_AUTHOR = "cwchiu@hotmail.com"
MODULE_LAST_UPDATE = "2008/03/18"
DEFAULT_SAVEPATH = 'D:\\'
-------------------------------------------------------------------------
--local func
-------------------------------------------------------------------------
local function DownFile()
if not GetHtml() then return false end
if not Compile("link = 'http://([./%0-9a-zA-Z_-]+)';") then return false end
local _,url = What()
if url == nil then
return v_0_0_5();
else
return GetFile('http://' .. url );
end
end
function v_0_0_5()
if not GetHtml() then return false end
if not Compile("name=\"download\" type=\"hidden\" id=\"download\" value=\"([^\"]+)\">") then return false end
local _,download = What()
if not download then
UpdateLog("找不到 download 欄位,請檢查紀錄檔")
CreateLogFile("zshare_download_failed.html")
return false
end
AddFormField("download",download)
PostForm()
--if not Compile("<meta http-equiv=\"Refresh\".+?URL=([^\"]+)\">") then return false end
if not Compile("link_enc=new Array\((.*)\);link") then return false end
local _,url = What()
local link = ''
for word in string.gmatch(url, "'(.)'") do
link = link .. word
end
url = link;
if not url then
if GetUrl():find('404%.html') then
UpdateLog("沒有這個檔案 ╭(─╴╴─)╮ ▃▇")
else
UpdateLog("找不到真實路徑,請檢查紀錄檔")
CreateLogFile("zshare_download_failed.html")
end
return false
end
return GetFile(url)
end
-------------------------------------------------------------------------
--main
-------------------------------------------------------------------------
function Download()
local url = GetUrl()
if url:find( "zshare%.net/download" ) then
return DownFile()
else
UpdateLog("網址有誤")
return false
end
end
function Upload()
if not GetHtml("http://www.zshare.net/") then return false end
if not Compile("<form name=\"upload\" method=\"POST\" action=\"([^\"]+)\"") then return false end
local _,action = What()
if not action then
UpdateLog("找不到上傳表格,請檢查紀錄檔")
CreateLogFile("zshare_upload_failed.html")
return false
end
AddFormField("TOS","1")
AddFormFile("file")
UpdateLog("準備上傳...","info")
if not UploadFile(action) then return false end
if not Compile("Direct Link:.+?value=\"(http[^\"]+)\".+?Delete Link:.+?value=\"(http:[^\"]+)\"") then return false end
local _,u1,u2 = What()
if not u1 or not u2 then
UpdateLog("找不到網址1/2,視為失敗,請檢查紀錄檔")
CreateLogFile("zshare_upload_failed.html")
return false
end
SetUrl(u1,u2)
UpdateLog("上傳成功,網址1為檔案連結,網址2為刪除連結", "info")
return true
end
-----------------------
[BBFish 在 2008-3-28 09:28 PM 作了最後編輯]
[如果你喜歡本文章,就按本文章之鮮花~送花給作者吧,你的支持就是別人的動力來源]
|
|