Files
setup.src
- import_code("/home/me/h/libs/list.src")
- import_code("/home/me/h/libs/disk.src")
- import_code("/home/me/h/libs/passwords.src")
- get_import_paths = function(code)
- lines = code.split(char(10))
- r = []
- for l in lines
- if l.indexOf("import_code" + "(""") != null then r.push(l.split("""")[1])
- end for
- return r
- end function
- check_sum_source = function(code)
- comp = get_shell.host_computer
- codes = [code]
-
- for s in get_import_paths(code)
- codes.push comp.File(s).get_content
- end for
-
- return md5(codes.join(""))
- end function
- comp = get_shell.host_computer
- print "setup hacking script"
- comp.File("/home/me/h/src/tableAttack.src").copy(home_dir + "/Config", "tableAttack.src")
- comp.File("/home/me/h/src/rserverInstaller.src").copy(home_dir + "/Config", "rserverInstaller.src")
- print "compiling cli tools"
- comp.create_folder(home_dir, "vegaTools")
- while true
comp.touch(home_dir, ".vega_watch")
watch_file = comp.File(home_dir + "/.vega_watch")
- comp.touch(home_dir, ".vega_watch")
- watch_file = comp.File(home_dir + "/.vega_watch")
watch_data = {}
f = function(o)
return o.split("=")
end function
if watch_file.get_content.len > 1 then watch_data = watch_file.get_content.split(char(10)).map(@f).to_map
- watch_data = {}
- f = function(o)
- return o.split("=")
- end function
- if watch_file.get_content.len > 1 then watch_data = watch_file.get_content.split(char(10)).map(@f).to_map
for f in comp.File("/home/me/h/cli").get_files
if watch_data.hasIndex(f.name) == false then watch_data[f.name] = md5(f.get_content)
- for f in comp.File("/home/me/h/cli").get_files
- if watch_data.hasIndex(f.name) == false then watch_data[f.name] = check_sum_source(f.get_content)
-
compiled_script = comp.File(home_dir + "/vegaTools/" + f.name[:-4])
- compiled_script = comp.File(home_dir + "/vegaTools/" + f.name[:-4])
if watch_data[f.name] != md5(f.get_content) or compiled_script == null then
print "compiling " + f.name
f.copy(home_dir + "/vegaTools", f.name)
b = get_shell.build(home_dir + "/vegaTools/" + f.name, home_dir + "/vegaTools")
if b.len > 0 then print(f.name + " error: <color=red>" + b + "</color>")
comp.File(home_dir + "/vegaTools/" + f.name).delete
watch_data[f.name] = md5(f.get_content)
end if
end for
f = function(o)
return o[0] + "=" + o[1]
end function
watch_file.set_content watch_data.to_list.map(@f).join(char(10))
- if watch_data[f.name] != check_sum_source(f.get_content) or compiled_script == null then
- print "compiling " + f.name
- f.copy(home_dir + "/vegaTools", f.name)
- b = get_shell.build(home_dir + "/vegaTools/" + f.name, home_dir + "/vegaTools")
- if b.len > 0 then print(f.name + " error: <color=red>" + b + "</color>")
- comp.File(home_dir + "/vegaTools/" + f.name).delete
- watch_data[f.name] = check_sum_source(f.get_content)
- end if
- end for
- f = function(o)
- return o[0] + "=" + o[1]
- end function
- watch_file.set_content watch_data.to_list.map(@f).join(char(10))
- if params.hasIndex(0) == false or params[0] != "-w" then break
- end while
- Disk.init("/home/me/Config", "passwords")
- // setup passwords db
- if Disk.read_chars.len > 0 then exit
- if(Disk.blobs.len > 1) then exit("password generation setup already completed")
- PasswordGenerator.init(PASSWORDS)
- print "generating passwords, it will take a while"
- HASH_TABLE=PasswordGenerator.AllPasswords
- print "done"
- print "parsing passwords obj"
- f = function(o)
- return o[1]
- end function
- pass_list = HASH_TABLE.to_list.map(@f)
- print "done"
- print "writing to disk"
- Disk.write(pass_list.join(char(10)))
- print "done"
cli/missions.src
- import_code("/home/me/h/src/utils.src") // exports map.inspect, p
- import_code("/home/me/h/libs/list.src") // exports list utils and map utils
import_code("/home/me/h/libs/disk.src") // exports Disk, Block
import_code("/home/me/h/libs/nmap.src") // exports Nmap, Service
import_code("/home/me/h/libs/scan.src") // exports Scan
import_code("/home/me/h/libs/json.src") // exports Json
import_code("/home/me/h/src/rndIP.src") // exports rnd_ip
- import_code("/home/me/h/src/mail.src") // exports Mail, Inbox, Mission, depends on list utils
import_code("/home/me/h/libs/optionSelector.src") // exports option_selector
import_code("/home/me/h/src/machine.src") // exports Machine, MachineService, depends on Scan, Nmap , Json, rnd_ip
import_code("/home/me/h/src/shell.src") // extend map
TABLEATTACK_SCRIPT = get_shell.host_computer.File(home_dir + "/Config/tableAttack.src")
EMPTY_LOG_PATH = home_dir + "/Config/emptyLog"
PASSWORDS_DISK = new Disk
PASSWORDS_DISK.init(home_dir + "/Config", "passwords")
EXPLOITS_DISK = new Disk
EXPLOITS_DISK.init(home_dir + "/Config", "exploits")
ENTRIES_DISK = new Disk
ENTRIES_DISK.init(home_dir + "/Config", "entries")
Machine.metaxploit = include_lib("/lib/metaxploit.so")
Scan.metaxploit = include_lib("/lib/metaxploit.so")
get_shell.host_computer.touch(home_dir + "/Config", "sites.txt")
SITES_FILE = get_shell.host_computer.File(home_dir + "/Config/sites.txt")
- Command = {}
- Command.missions_sig = {}
- Command.missions_sig["description"] = "Reads your email to find academic missions and format them"
- Command.missions_sig["args"] = ["email*", "password*"]
- Command.missions_sig["options"] = [{["-s", "--delete-skip"]: "deletes missions with skip marked as true"}]
- Command.missions_sig["options"].push {["-d", "--delete-completed"]: "deletes completed missions"}
- Command.missions = function(args = [], options = {})
- inbox = new Inbox
- inbox.init(args[0], args[1])
-
- if options["-d"] == true then
- for m in inbox.missions
- if m.is_completed == true then
- m.meta_mail.delete(m.mail.id)
- end if
- end for
- end if
-
- missions_group = inbox.grouped_missions
-
- for key in missions_group.indexes
- print "===================<b>" + key + "</b>====================="
- for mission in missions_group[key]
- if mission.info.skip == true and options["-s"] == true then
- mission.meta_mail.delete(mission.mail.id)
- continue
- end if
-
- print "---------------------------"
- for o in mission.info
- print o.key + ": " + o.value
- end for
- end for
- end for
- end function
- import_code("/home/me/h/libs/thor.src") //depends on Listlib, exports Thor
- Thor.init(Command, "missions")