Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not params or params.len != 1 then exit("<b>Example:</b> bankgrabber [IP/DNS]")
- ip = params[0]
- if ip[0] == "w" then ip = nslookup(ip)
- myComputer = get_shell.host_computer
- programPath = parent_path(program_path) + "/Banks"
- grabFileName = "Banks_" + ip + ".txt"
- grabFilePath = programPath + "/" + grabFileName
- store = myComputer.File(grabFilePath)
- if store then
- store.set_content("")
- else
- myComputer.touch(programPath, grabFileName)
- store = myComputer.File(grabFilePath)
- end if
- grabFile = function(file)
- if not file.content then return
- store.set_content(store.content + file.content + "\n")
- end function
- hackUser = function(computer, userDir)
- conf = computer.File(userDir.path + "/Config")
- if not conf then return
- for file in conf.get_files
- if file.name == "Bank.txt" then grabFile(file)
- end for
- end function
- hackComputer = function(computer)
- dir = computer.File("/home")
- if not dir then return
- for userDir in dir.get_folders
- hackUser(computer, userDir)
- end for
- end function
- router = get_router(ip)
- for computer in router.get_computers
- hackComputer(computer)
- end for
- store.set_content(store.content[:-1])
- print("[Grabbed " + store.content.split("\n").len + " accounts]")
Add Comment
Please, Sign In to add comment