Advertisement
cracker64

algersoft

Aug 21st, 2015
526
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.45 KB | None | 0 0
  1. -- Download Algersoft website script! In Lua 5.1.*
  2. -- Also requires the Luasocket library http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2
  3. -- Setting the 'last modified' date on the filesystem(windows) is with sfk174.exe
  4. -- cracker64
  5. require 'socket'
  6. local ltn12 = require 'ltn12'
  7. local http = require 'socket.http'
  8. local mime = require 'mime'
  9.  
  10. local base = "http://algersoft.net"
  11. local pigCount = 0
  12. local paths = {
  13.     --["\\"] = {"index.html","seized.png","charges.html","seized_nooope.png"}, //OLD APRIL FOOLS FILES
  14.    
  15.     ["\\"] = {"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"},
  16.     ["\\"] = {"stylesheet.css","index.php","menu.html"},--,"formula.php"},
  17.    
  18.     ["\\about"] = {"index.php"},["\\expertise"] = {"index.php"},["\\testimonial"] = {"index.php"},["\\contact"] = {"index.php"},
  19.    
  20.     ["\\OBJMWZINIOVBSQUMYDZPXY"] = {"index.php"},
  21.     ["\\YZFQGZABUMDTSCWAWVPFTE"] = {"index.php"},
  22.    
  23.     ["\\"] = {"audio_image.png","audio_image_faded.png","audio_image_success.png"},
  24.     ["\\kriegerathome"] = {["ADDHEAD"] = {["Referer"]="http://algersoft.net/kriegerathome"},"index.php","kah.css","clue.png","wow_signal.wav"},
  25.     ["\\worm"] = {["ADDHEAD"] = {["Referer"]="http://algersoft.net/"},"worm.gif","worm.mp3","logo_glitch_1.png","logo_glitch_2.png","logo_glitch_3.png"},
  26.     --]]
  27.    
  28.     ["\\font"] = {"Realpolitik.ttf.eot","Realpolitik.ttf.svg","Realpolitik.ttf.woff"},
  29.     ["\\images"] = {"background.png","icons.png","logo.png"},
  30.     ["\\login"] = {"index.php"},--,"error_log"},
  31.     ["\\login\\krieger"] = {"insurance.zip",},--"error_log"},
  32.     --]]
  33.    
  34.     ["\\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"},
  35.     ["\\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},
  36.     --
  37.     ["\\login\\krieger\\surveillance"] = {"reconnaissance.php","kr-cam viewer v2.8.html","cam_stylesheet.css","kr-cam viewer v2.8.php"},
  38.     ["\\login\\krieger\\surveillance\\cams"] = {["ADDHEAD"] = {["Referer"]="http://algersoft.net/login/krieger/surveillance/kr-cam%20viewer%20v2.8.php"},
  39.         "cam1.html","cam2.html","cam3.html","cam4.html","cam5.html","cam6.html","cam7.html","cam8.html","cam9.html",
  40.         "cam1.mp4","cam2.mp4","cam3.mp4","cam4.mp4","cam5.mp4","cam6.mp4","cam7.mp4","cam8.mp4","cam9.mp4",
  41.         "cam1.webm","cam2.webm","cam3.webm","cam4.webm","cam5.webm","cam6.webm","cam7.webm","cam8.webm","cam9.webm",
  42.         },
  43.     --]]
  44.     --
  45.     ["\\login\\krieger\\misc"] = {"cell phone hacks.php","pin ups.php","forty four a.png"},
  46.    
  47.     ["\\login\\krieger\\projects"] = {"arson simulation.html","game_stylesheet.css","arson simulation.php"},
  48.     ["\\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"},
  49.     ["\\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"},
  50.    
  51.     ["\\login\\krieger\\tones\\iphone"] = {"Mulatto Butts.m4r","Mulatto Cops.m4r","Teutonic Butts.m4r"},
  52.     ["\\login\\krieger\\tones\\not iphone"] = {"Mulatto Butts.mp3","Mulatto Cops.mp3","Teutonic Butts.mp3"},
  53.    
  54.     ["\\login\\mitsuko"] = {"fisherman's daughter.php","forty four b.png",},--"error_log"},
  55.     --]]
  56. }
  57. --Create a local file structure of the Paths
  58. for url,files in pairs(paths) do
  59.     os.execute("mkdir \".\\algersoft.net"..url.."\"")
  60.     for i,file in ipairs(files) do
  61.         if type(file)=="function" then
  62.             table.remove(files,i)
  63.             local r = file()
  64.             while r do
  65.                 table.insert(files,r)
  66.                 r = file()
  67.             end
  68.         end
  69.     end
  70. end
  71. 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}
  72. -- For each directory
  73. for url,files in pairs(paths) do
  74.     local tempHeaders = {["Cache-Control"] = "no-cache",["Pragma"]="no-cache",["Connection"]="close",}
  75.     --Some Directories need extra headers to download
  76.     if files["ADDHEAD"] then
  77.         for newH,newV in pairs(files["ADDHEAD"]) do
  78.             tempHeaders[newH] = newV
  79.             print("Adding Special Headers for This section")
  80.         end
  81.     end
  82.     -- For each file
  83.     for _,file in ipairs(files) do
  84.         local respbody = {}
  85.         local r,c,h = http.request{
  86.             url     = base..url:gsub("\\","/").."/"..file,
  87.             method = "GET",
  88.             headers = tempHeaders,
  89.             sink = ltn12.sink.table(respbody)
  90.         }
  91.         if c==200 then
  92.             --If the webserver gives back a date, save it, I found some simple utility to apply it to a file (on windows)
  93.             local day,month,year,hour,mins,secs = (h["last-modified"] or ""):match(", (%d+) (%w+) (%d%d%d%d) (%d%d):(%d%d):(%d%d)")
  94.             if secs then
  95.                 hour = (tonumber(hour)-4)
  96.                 day = tonumber(day)
  97.                 if hour<0 then
  98.                     hour = hour%24
  99.                     day = day-1
  100.                 end
  101.             end
  102.             --print(day,month,year,hour,mins,secs)
  103.             if r then
  104.                 --Write the response in the file!
  105.                 local name = "algersoft.net"..url.."\\"..file
  106.                 local f,e = io.open(name,"wb")
  107.                 print("Writing "..name)
  108.                 if not f then print(e) end
  109.                 f:write(table.concat(respbody))
  110.                 f:close()
  111.                
  112.                 --If we had a date
  113.                 if secs then
  114.                     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.."\"")
  115.                 end
  116.             end
  117.         elseif c==301 or c==302 then
  118.             --Follow some redirect responses, only print link
  119.             if h["location"] then
  120.                 local name = "algersoft.net"..url.."\\"..file
  121.                 local f,e = io.open(name,"wb")
  122.                 print("Writing redirect "..name)
  123.                 if not f then print(e) end
  124.                 f:write("This file redirects to "..h["location"])
  125.                 f:close()
  126.             end
  127.         else
  128.             print(url.."/"..file.." Failed with "..c)
  129.         end
  130.     end
  131. end
  132. --The user login pages are accessible with an easy POST
  133. local function specialPost(url,filepath,postData)
  134.     local respbody = {}
  135.     local r,c,h = http.request{
  136.         url     = base..url,
  137.         source = ltn12.source.string(postData),
  138.         method = "POST",
  139.         headers = {["Content-Type"]="application/x-www-form-urlencoded",["Content-Length"]=#postData},
  140.         sink = ltn12.sink.table(respbody),
  141.     }
  142.     if c==200 then
  143.         if r then
  144.             local f,e = io.open(filepath,"wb")
  145.             print("Special: trying to write "..filepath)
  146.             if not f then print(e) end
  147.             f:write(table.concat(respbody))
  148.             f:close()
  149.         end
  150.     else
  151.         print(url.." Failed with "..c)
  152.     end
  153. end
  154. -- Request krieger and mitsuko!
  155. specialPost("/login/login_form.php","algersoft.net\\login\\krieger\\secure.php","username=krieger&password=guest&submit=LOG IN")
  156. specialPost("/login/login_form.php","algersoft.net\\login\\mitsuko\\secret.php","username=mitsuko&password=tentacle&submit=LOG IN")
  157.  
  158. print(os.date().." Finished downloading")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement