Skip to content

Instantly share code, notes, and snippets.

View tjmonsi's full-sized avatar

Toni-Jan Keith Monserrat tjmonsi

View GitHub Profile
// Loads libs from /lib or from /home/[active_user]
// Tests if metaxploit is in lib
globals.metaxploit = include_lib("/lib/metaxploit.so")
// checks if metaxploit is in /home/active-user
if not globals.metaxploit then globals.metaxploit = include_lib(home_dir + "/metaxploit.so")
if not globals.metaxploit then exit("<color=#ff0000>Load metaxploit on either lib or home_dir</color>")
// Loads libs from /lib or from /home/[active_user]
// Tests if metaxploit is in lib
globals.crypto = include_lib("/lib/crypto.so")
// checks if metaxploit is in /home/active-user
if not globals.crypto then globals.crypto = include_lib(home_dir + "/crypto.so")
if not globals.crypto then exit("<color=#ff0000>Load crypto on either lib or home_dir</color>")
import_code("/home/tjmonsi/scripts/lib/paramsparser.src")
import_code("/home/tjmonsi/scripts/lib/metaxploitscan.src")
config = tjx_params_parser(program_path.split("/")[-1], ["public_ip", "port_number"], 1)
publicIp = config.public_ip
portNumber = null
if config.hasIndex("port_number") then portNumber = config.port_number
@tjmonsi
tjmonsi / scanlib2.src
Created December 30, 2023 13:55
scanlib2.src
import_code("/home/tjmonsi/scripts/lib/paramsparser.src")
import_code("/home/tjmonsi/scripts/lib/findindex.src")
import_code("/home/tjmonsi/scripts/lib/scanrouter.src")
import_code("/home/tjmonsi/scripts/lib/metaxploitscan.src")
config = tjx_params_parser(program_path.split("/")[-1], ["target_ip"], 1)
target_ip = null
if config.hasIndex("target_ip") then target_ip = config.target_ip
@tjmonsi
tjmonsi / metaxploitscan.src
Last active December 31, 2023 04:50
Greyhack metaxploit scan
tjx_metaxploit_scan = function (ip, port)
content = []
printText = function (text)
print(text)
content = content.push(text)
end function
metaxploit = include_lib("/lib/metaxploit.so")
@tjmonsi
tjmonsi / connectnetwork.src
Last active December 31, 2023 00:54
Made it into a function so i can reuse it
// USAGE: tjx_connect_network("wlan0")
tjx_connect_network = function (network_device)
crypto = include_lib("/lib/crypto.so")
if not crypto then exit("Cannot find crypto.so in /lib")
computer = get_shell.host_computer
crypto.airmon("start", network_device)
networks = computer.wifi_networks(network_device)
@tjmonsi
tjmonsi / gist:7563bc5beb1c4ce0256fab7b0ae60604
Last active December 29, 2023 14:49
Use this to get the params and put it into a map object
// USAGE: tjx_params_parser("myprogram", ["ip_address", "port", "memory"], 1)
// params:
// - cmd: the string of your command
// - variableList: the list of variables you want to get
// - optional: the number of optional variables starting from the end of the array
// - description: the description of usage
tjx_params_parser = function (cmd, variableList, optional, description)
if not description or not description isa string then
description = ""
@tjmonsi
tjmonsi / print_decipher.src
Last active December 31, 2023 05:32
Prints the deciphered text given a text content (new line delimited)
tjx_print_decipher = function (text)
crypto = globals.crypto
items = []
if not crypto then exit("Cannot find crypto.so")
if not text then
print("No text to decipher")
return items
end if
@tjmonsi
tjmonsi / get_etc_passwd.src
Last active December 29, 2023 13:34
Find the etc/passwd given a file/folder location
// USAGE:
// tjx_get_etc_passwd(file)
// parameters: file is type File
tjx_get_etc_passwd = function(file)
print("Starting search at: " + file.path)
_gotoroot = function(folder)
if folder.parent then
return _gotoroot(folder.parent)
@tjmonsi
tjmonsi / findindex.src
Created December 29, 2023 12:50
Simple find_index function to find items in list of maps
// USAGE:
// import_code("path/to/findindex.src")
// list = [item, item, item]
// somefunction = function (item, value)
// return item.something == value
// end function
//
// index = find_index(list, value, @somefunction)
find_index = function (list, value, fn)