Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Download Algersoft website script! In Lua 5.1.*
- -- Also requires the Luasocket library http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2
- -- Setting the 'last modified' date on the filesystem(windows) is with sfk174.exe
- -- cracker64
- require 'socket'
- local ltn12 = require 'ltn12'
- local http = require 'socket.http'
- local mime = require 'mime'
- local base = "http://algersoft.net"
- local pigCount = 0
- local paths = {
- --["\\"] = {"index.html","seized.png","charges.html","seized_nooope.png"}, //OLD APRIL FOOLS FILES
- ["\\"] = {"hero_facebook.jpg","hero_twitter.jpg","hero_ynms_twitter.jpg","hero_ynms_facebook.jpg","hero_cam_twitter.jpg","hero_cam_facebook.jpg","apple-touch-icon.png","hero_kah_facebook.jpg","hero_kah_twitter.jpg"},--"error_log"},
- ["\\"] = {"stylesheet.css","index.php","menu.html"},--,"formula.php"},
- ["\\about"] = {"index.php"},["\\expertise"] = {"index.php"},["\\testimonial"] = {"index.php"},["\\contact"] = {"index.php"},
- ["\\OBJMWZINIOVBSQUMYDZPXY"] = {"index.php"},
- ["\\YZFQGZABUMDTSCWAWVPFTE"] = {"index.php"},
- ["\\"] = {"audio_image.png","audio_image_faded.png","audio_image_success.png"},
- ["\\kriegerathome"] = {["ADDHEAD"] = {["Referer"]="http://algersoft.net/kriegerathome"},"index.php","kah.css","clue.png","wow_signal.wav"},
- ["\\worm"] = {["ADDHEAD"] = {["Referer"]="http://algersoft.net/"},"worm.gif","worm.mp3","logo_glitch_1.png","logo_glitch_2.png","logo_glitch_3.png"},
- --]]
- ["\\font"] = {"Realpolitik.ttf.eot","Realpolitik.ttf.svg","Realpolitik.ttf.woff"},
- ["\\images"] = {"background.png","icons.png","logo.png"},
- ["\\login"] = {"index.php"},--,"error_log"},
- ["\\login\\krieger"] = {"insurance.zip",},--"error_log"},
- --]]
- ["\\login\\krieger\\research"] = {"AREA 51 MAP.GIF","COMINT PART A.PDF","CYBERNETICS.PDF","LINEAR SYSTEMS.PDF","MAGNETIC FIELDS.PDF","NSA UFO DOC.GIF","photo journal.php","SUPERCONDUCTING.PDF"},
- ["\\login\\krieger\\research\\pigs"] = {function() pigCount=pigCount+1 if pigCount>200 then return nil end local pig = ((pigCount<10) and "00"..pigCount) or ((pigCount<100) and "0"..pigCount or pigCount) return "PIG_"..pig..".GIF" end},
- --
- ["\\login\\krieger\\surveillance"] = {"reconnaissance.php","kr-cam viewer v2.8.html","cam_stylesheet.css","kr-cam viewer v2.8.php"},
- ["\\login\\krieger\\surveillance\\cams"] = {["ADDHEAD"] = {["Referer"]="http://algersoft.net/login/krieger/surveillance/kr-cam%20viewer%20v2.8.php"},
- "cam1.html","cam2.html","cam3.html","cam4.html","cam5.html","cam6.html","cam7.html","cam8.html","cam9.html",
- "cam1.mp4","cam2.mp4","cam3.mp4","cam4.mp4","cam5.mp4","cam6.mp4","cam7.mp4","cam8.mp4","cam9.mp4",
- "cam1.webm","cam2.webm","cam3.webm","cam4.webm","cam5.webm","cam6.webm","cam7.webm","cam8.webm","cam9.webm",
- },
- --]]
- --
- ["\\login\\krieger\\misc"] = {"cell phone hacks.php","pin ups.php","forty four a.png"},
- ["\\login\\krieger\\projects"] = {"arson simulation.html","game_stylesheet.css","arson simulation.php"},
- ["\\login\\krieger\\projects\\html5game"] = {["ADDHEAD"] = {["Referer"]="http://algersoft.net/login/krieger/projects/arson%20simulation.php"},"soundBarryWin.ogg","Cheryl_Original.js","Cheryl_Original_texture_0.png","Cheryl_Original_texture_1.png","soundFIRE.ogg","sound2.ogg","soundDOOR.ogg","soundLeave.ogg","soundToast.ogg","soundWalk1.ogg","soundWalk2.ogg","soundBump.ogg","soundStart.ogg","soundwin1.ogg","soundEndGame.ogg","soundMainTheme.ogg"},
- ["\\login\\krieger\\projects\\html5game\\particles"] = {["ADDHEAD"] = {["Referer"]="http://algersoft.net/login/krieger/projects/arson%20simulation.php"},"IDR_GIF1.png","IDR_GIF2.png","IDR_GIF3.png","IDR_GIF4.png","IDR_GIF5.png","IDR_GIF6.png","IDR_GIF7.png","IDR_GIF8.png","IDR_GIF9.png","IDR_GIF10.png","IDR_GIF11.png","IDR_GIF12.png","IDR_GIF13.png","IDR_GIF14.png","IDR_GIF15.png"},
- ["\\login\\krieger\\tones\\iphone"] = {"Mulatto Butts.m4r","Mulatto Cops.m4r","Teutonic Butts.m4r"},
- ["\\login\\krieger\\tones\\not iphone"] = {"Mulatto Butts.mp3","Mulatto Cops.mp3","Teutonic Butts.mp3"},
- ["\\login\\mitsuko"] = {"fisherman's daughter.php","forty four b.png",},--"error_log"},
- --]]
- }
- --Create a local file structure of the Paths
- for url,files in pairs(paths) do
- os.execute("mkdir \".\\algersoft.net"..url.."\"")
- for i,file in ipairs(files) do
- if type(file)=="function" then
- table.remove(files,i)
- local r = file()
- while r do
- table.insert(files,r)
- r = file()
- end
- end
- end
- end
- local months = {["Jan"]="01",["Feb"]="02",["Mar"]="03",["Apr"]="04",["May"]="05",["Jun"]="06",["Jul"]="07",["Aug"]="08",["Sep"]="09",["Oct"]=10,["Nov"]=11,["Dec"]=12}
- -- For each directory
- for url,files in pairs(paths) do
- local tempHeaders = {["Cache-Control"] = "no-cache",["Pragma"]="no-cache",["Connection"]="close",}
- --Some Directories need extra headers to download
- if files["ADDHEAD"] then
- for newH,newV in pairs(files["ADDHEAD"]) do
- tempHeaders[newH] = newV
- print("Adding Special Headers for This section")
- end
- end
- -- For each file
- for _,file in ipairs(files) do
- local respbody = {}
- local r,c,h = http.request{
- url = base..url:gsub("\\","/").."/"..file,
- method = "GET",
- headers = tempHeaders,
- sink = ltn12.sink.table(respbody)
- }
- if c==200 then
- --If the webserver gives back a date, save it, I found some simple utility to apply it to a file (on windows)
- local day,month,year,hour,mins,secs = (h["last-modified"] or ""):match(", (%d+) (%w+) (%d%d%d%d) (%d%d):(%d%d):(%d%d)")
- if secs then
- hour = (tonumber(hour)-4)
- day = tonumber(day)
- if hour<0 then
- hour = hour%24
- day = day-1
- end
- end
- --print(day,month,year,hour,mins,secs)
- if r then
- --Write the response in the file!
- local name = "algersoft.net"..url.."\\"..file
- local f,e = io.open(name,"wb")
- print("Writing "..name)
- if not f then print(e) end
- f:write(table.concat(respbody))
- f:close()
- --If we had a date
- if secs then
- os.execute("sfk174.exe touch -date "..year..months[month]..(day<10 and "0"..day or day)..(hour<10 and "0"..hour or hour)..mins..secs.." \""..name.."\"")
- end
- end
- elseif c==301 or c==302 then
- --Follow some redirect responses, only print link
- if h["location"] then
- local name = "algersoft.net"..url.."\\"..file
- local f,e = io.open(name,"wb")
- print("Writing redirect "..name)
- if not f then print(e) end
- f:write("This file redirects to "..h["location"])
- f:close()
- end
- else
- print(url.."/"..file.." Failed with "..c)
- end
- end
- end
- --The user login pages are accessible with an easy POST
- local function specialPost(url,filepath,postData)
- local respbody = {}
- local r,c,h = http.request{
- url = base..url,
- source = ltn12.source.string(postData),
- method = "POST",
- headers = {["Content-Type"]="application/x-www-form-urlencoded",["Content-Length"]=#postData},
- sink = ltn12.sink.table(respbody),
- }
- if c==200 then
- if r then
- local f,e = io.open(filepath,"wb")
- print("Special: trying to write "..filepath)
- if not f then print(e) end
- f:write(table.concat(respbody))
- f:close()
- end
- else
- print(url.." Failed with "..c)
- end
- end
- -- Request krieger and mitsuko!
- specialPost("/login/login_form.php","algersoft.net\\login\\krieger\\secure.php","username=krieger&password=guest&submit=LOG IN")
- specialPost("/login/login_form.php","algersoft.net\\login\\mitsuko\\secret.php","username=mitsuko&password=tentacle&submit=LOG IN")
- print(os.date().." Finished downloading")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement