diff --git a/extension.js b/extension.js index a6b3644..fbd93b6 100644 --- a/extension.js +++ b/extension.js @@ -2,14 +2,22 @@ const vscode = require("vscode"); const debug = vscode.window.createOutputChannel("Greyscript Debugging") var CompData = [ + // Shell "host_computer", "start_terminal", "build", "connect_service", "launch", "ping", - "put", "scp", + "apt_show", + "apt_search", + "apt_update", + "apt_add_repo", + "apt_install", + "apt_check_upgrade", + // FtpShell + "put", // Crypto, "aircrack", "airmon", @@ -170,8 +178,15 @@ var TypeData = { "connect_service": "shell", "launch": "shell", "ping": "shell", - "put": "shell", "scp": "shell", + "apt_show": "shell", + "apt_search": "shell", + "apt_update": "shell", + "apt_add_repo": "shell", + "apt_install": "shell", + "apt_check_upgrade": "shell", + // FtpShell + "put": "ftpshell", // Crypto "aircrack": "crypto", "airmon": "crypto", @@ -322,14 +337,22 @@ var TypeData = { } var ArgData = { + // Shell "host_computer": 0, "start_terminal": 0, "build": 2, "connect_service": 4, "launch": 2, "ping": 1, - "put": 3, "scp": 3, + "apt_show": 1, + "apt_search": 1, + "apt_update": 0, + "apt_add_repo": 2, + "apt_install": 1, + "apt_check_upgrade": 1, + // FtpShell + "put": 3, // Crypto, "aircrack": 1, "airmon": 1, @@ -532,20 +555,33 @@ var HoverData = { "if": "Use if blocks to do different things depending on some condition. \nInclude zero or more else if blocks and one optional else block.", "else": "Use if blocks to do different things depending on some condition. \nInclude zero or more else if blocks and one optional else block.", // Shell - "host_computer": "Shell.host_computer() : Computer\n\nReturns the computer associated with the Shell.", - "start_terminal": "Shell.start_terminal() : Null\n\nLaunch an active terminal from the Shell.", - "build": "Shell.build(string pathSource, string pathBinary) : Int or String\n\nCompile the source code of the file that is in the provided path, and save the executable in the destination path.\nThe name of the executable is the same as that of the source file without the extension.\nThe provided paths must be absolutes.", - "connect_service": "Shell.connect_service(string ip, int port, string username, string password) : Shell\n\nConnect to a remote service. Returns a shell if the connection has been established correctly.", - "launch": "Shell.launch(string path, string args) : Null\n\nLaunches the command in the provided path.", + "host_computer": [ + "Shell.host_computer() : Computer\n\nReturns the computer associated with the Shell.", + "FtpShell.host_computer() : Computer\n\nReturns the computer associated with the FtpShell.", + ], + "start_terminal": [ + "Shell.start_terminal() : Null\n\nLaunch an active terminal from the Shell.", + "FtpShell.start_terminal() : Null\n\nLaunch an active terminal from the FtpShell.", + ], + "build": "Shell.build(string pathSource, string pathBinary) : String\n\nCompile the source code of the file that is in the provided path, and save the executable in the destination path.\nThe name of the executable is the same as that of the source file without the extension.\nThe provided paths must be absolutes.\n\nReturns a string (empty on success, or with an error on failure)", + "connect_service": "Shell.connect_service(string ip, int port, string username, string password, opt string serviceType) : Shell or FtpShell or Null\n\nConnect to a remote service. You can specify 'ftp' in the serviceType to request a FtpShell\n\nReturns a Shell or FtpShell if the connection has been established correctly or null on failure", + "launch": "Shell.launch(string path, string args) : Null or Int\n\nLaunches the command in the provided path.\n\nReturns null on success, or 0 on failure", "ping": "Shell.ping(string ip) : Int\n\nReturns true if the remote address could be reached, false otherwise. Firewalls do not block ping requests.", - "put": "Shell.put(string pathOrigin, string pathDestination, shell remoteShell) : Int or String\n\nCopy a file from one computer to the other through the network.", - "scp": "Shell.scp(string pathOrigin, string pathDestination, shell remoteShell) : Int or String\n\nCopy a file from one computer to the other through the network.", + "scp": "Shell.scp(string pathOrigin, string pathDestination, shell remoteShell) : Int or String\n\nCopy a file from one computer to the other through the network.\n\nReturns 1 on success, or a string (containing an error) on failure", + "apt_show": "Shell.apt_show(string repositoryName) : String\n\nShows all packages available in repository\nThe repository MUST be added in the /etc/apt/sources.txt file.\n\nReturns string with all pachages on success, or a string (containing an error) on failure", + "apt_search": "Shell.apt_search(string packageName) : String\n\nSearch specifically for the package in any of the repositories listed in /etc/apt/sources.txt\n\nReturns either a string with information about the package, or a string (containing an error) on failure", + "apt_update": "Shell.apt_update() : String\n\nUpdate the list of available packages after adding a new repository in /etc/apt/sources.txt, or if the remote repository has updated its information in /server/conf/repod.conf\n\nReturns string containing all repository addresses with 'Updated' prefix on success, or a string (containing an error) on failure", + "apt_add_repo": "Shell.apt_add_repo(string repositoryAddress, opt int port) : String\n\nAdd the repository address in the /etc/apt/sources.txt file\n\nReturns empty string on success, or a string (containing an error) on failure", + "apt_install": "Shell.apt_install(string packageName) : Int or String\n\nInstall the program or library from a remote repository listed in /etc/apt/sources.txt\n\nReturns 1 on success, or a string (containing an error) on failure", + "apt_check_upgrade": "Shell.apt_check_upgrade(string packageName) : Int or String\n\nCheck if there is a newer version of the package in the repository.\n\nReturns 1 if there is a newer version, or 0 if there is not a newer version, or a string (containing an error) on failure", + // FtpShell + "put": "FtpShell.put(string pathOrigin, string pathDestination, shell remoteShell) : Int or String\n\nCopy a file from one computer to the other through the network.\n\nReturns 1 on success, or a string (containing an error) on failure", // Crypto "aircrack": "Crypto.aircrack(string path) : String or Null\n\nReturns a string with the password generated from the file created by aireplay.", "airmon": "Crypto.airmon(string option, string interface) : Int\n\nEnables or disables the monitor mode of a network device. The option parameter can only be 'start' or 'stop'.", "aireplay": "Crypto.aireplay(string essid, string bssid, opt int maxAcks) : Int or String\n\nUsed to inject frames on wireless interfaces.\n\n\n\nOnce the command with Control+C is stopped, it will save the captured information in a text file called file.cap in the path where the terminal is currently located.\n\nAlternatively, a maximum of captured acks can be specified for the command to stop automatically, saving the file.cap file as described above.\n\nIn the event that there is an error, a string will be returned with the message indicating the problem.", "decipher": "Crypto.decipher(string user, string encryptedPass) : String or Null\n\nStart the process of decrypting the password.", - "smtp_user_list": "Crypto.smtp_user_list(string ip, int port) : List[string]\n\nSMTP services are mail services. When using this method with the IP of a mail server, due to a vulnerability in the service, it returns a list of the existing users on the computer where the SMTP service is working. \nIf these users also have an email account registered on the SMTP server, it will be indicated in the list.", + "smtp_user_list": "Crypto.smtp_user_list(string ip, int port) : List[string] or String\n\nSMTP services are mail services. When using this method with the IP of a mail server, due to a vulnerability in the service, it returns a list of the existing users on the computer where the SMTP service is working. \nIf these users also have an email account registered on the SMTP server, it will be indicated in the list.\n\nReturns a list object of all users on the machine, along with their email address or returns a string containing an error", // Metalib "lib_name": "Metalib.lib_name() : String\n\nPrint the name of the library.", "version": "Metalib.version() : String\n\nPrint the version of the library.", @@ -556,8 +592,8 @@ var HoverData = { "rshell_client": "Metaxploit.rshell_client(string ip, int port, opt string proccessName) : String or Int\n\nLaunches a process on the victim's machine, which silently tries to continuously connect in the background to the specified address and port.\nFor the reverse shell to run successfully, the rshell service must be installed and the portforward configured correctly on the machine where the server is waiting for the victim's connection.", "rshell_server": "Metaxploit.rshell_server() : List[Shell] or String\n\nThis method returns a list of shell objects that have been reverse shell connected to this machine.\nIn order to manage the connections received, the rshell service must be installed on the machine that receives the victims' connections.", "scan_address": "Metaxploit.scan_address(metalib Metalib, string address) : String or Null\n\nIt analyzes a specific memory address and shows the vulnerable parts that can be exploited.", - "scan": "Metaxploit.scan(metalib Metalib) : List or Null\n\nAnalyze the memory areas occupied by the library in search of vulnerabilities. Returns a list with the affected memory zones.", - "sniffer": "Metaxploit.sniffer(opt bool saveEncodeSource) : String\n\nThe terminal listens to the network packets of any connection that passes through this device. \nWhen any connection information is captured, it prints a string with the obtained data. \nIt can save the source code of the encode script if saveEncSource is true.\nNull is returned if the listen could not be started.", + "scan": "Metaxploit.scan(metalib Metalib) : List[String] or Null\n\nAnalyze the memory areas occupied by the library in search of vulnerabilities. Returns a list with the affected memory zones.", + "sniffer": "Metaxploit.sniffer(opt bool saveEncodeSource) : String or Null\n\nThe terminal listens to the network packets of any connection that passes through this device. \nWhen any connection information is captured, it prints a string with the obtained data. \nIt can save the source code of the encode script if saveEncSource is true.\nNull is returned if the listen could not be started.", // Port "port_number": "Port.port_number : Int\n\nReturns an int with the configured port number.", "is_closed": "Port.is_closed : Int\n\nReturns true if this port is closed, false otherwise.", @@ -569,62 +605,68 @@ var HoverData = { "essid_name": "Router.essid_name : String\n\nReturns a string with the ESSID value of the router.", "firewall_rules": "Router.firewall_rules : List[string]\n\nReturns a string list with the firewall rules present in the router or switch.", "kernel_version": "Router.kernel_version : String\n\nReturns a string with the version of the kernel_router.so library", - "local_ip": "Router.local_ip : String\n\nReturns a string with the computer or router local ip address.", + "local_ip": [ + "Router.local_ip : String\n\nReturns a string with the router's local ip address.", + "Computer.local_ip : String\n\nReturns a string with the computer's local ip address.", + ], "ping_port": "Router.ping_port(int port) : Port\n\nReturns the port object that is behind the port number provided if exists, null otherwise.", "port_info": "Router.port_info(port Port) : String\n\nReturns a string with the information of the port that has been provided. The port provided must not belong to another network than this router.", - "public_ip": "Router.public_ip : String\n\nReturns the public ip of the router or computer object.", + "public_ip": [ + "Router.public_ip : String\n\nReturns a string with the router's public ip address.", + "Computer.public_ip : String\n\nReturns a string with the computer's public ip address.", + ], "used_ports": "Router.used_ports : List\n\nReturns an array of ports that are being used in this router.", // NetSession "dump_lib": "NetSession.dump_lib : Metalib\n\nReturns the metalib associated with the remote service.\n\n\n\nFor example, connecting to a computer with the ssh service will return a metalib libssh object.\n\nIn the case of connecting to a router, it returns a metalib kernel_router object.", // File - "chmod": "File.chmod(string path, opt int isRecursive) : Int\n\nModifies the file's permissions\n\n\n\nTakes a permissions string (e.g. u+wr) and optional recursive flag (int 0 or 1)\n\nIf the file is a folder and the recursive flag is 1, the permissions change will apply recursively, to all the files and folders inside the folder.", - "copy": "File.copy(string path, string newName) : Int\n\nCopy the file to the specified path.", - "move": "File.move(string path, string newName) : Int\n\nMove the file to the specified path.", - "rename": "File.move(string newName) : Int\n\nRename the file with the name provided.", - "path": "File.path : String\n\nReturns a string with the path of the file.", - "parent": "File.parent : File\n\nReturns the folder that contains this file.", + "chmod": "File.chmod(string path, opt int isRecursive) : String\n\nModifies the file's permissions\n\n\n\nTakes a permissions string (e.g. u+wr) and optional recursive flag (int 0 or 1)\n\nIf the file is a folder and the recursive flag is 1, the permissions change will apply recursively, to all the files and folders inside the folder.\n\nReturns a string (empty on success, or with an error on failure)", + "copy": "File.copy(string path, string newName) : Int or String or Null \n\nCopy the file to the specified path.\n\nOn success, returns 1 and the terminal outputs the copied file dialogue. On failure, returns either an error (string) such as permission denied or null (if File object not valid).", + "move": "File.move(string path, string newName) : Int or String or Null\n\nMove the file to the specified path.\n\nOn success, returns 1. On failure, returns either an error (string) such as permission denied or null (if File object not valid).", + "rename": "File.move(string newName) : String\n\nRename the file with the name provided.\n\nReturns a string (empty on success, or with an error on failure)", + "path": "File.path : String\n\nReturns a string with the absolute path of the file.", + "parent": "File.parent : File or Null\n\nReturns the folder that contains this file or null if the initial object is /.", "name": "File.name : String\n\nReturns a string with the name of the file.", "get_content": "File.get_content : String\n\nReturns a string with the contents of the text file.", - "set_content": "File.set_content(string contents) : Null\n\nSave the text in the file. The content will be overwritten if there is already text saved in the file.", + "set_content": "File.set_content(string contents) : Int or String\n\nSave the text in the file. The content will be overwritten if there is already text saved in the file.\n\nReturns 1 on success, or a string (containing an error) on failure", "is_folder": "File.is_folder : Int\n\nReturns true if the file is folder, false otherwise.", "is_binary": "File.is_binary : Int\n\nReturns true if the file is binary, false otherwise.", "has_permission": "File.has_permission(string permission) : Int\n\nReturns true if the user who launches the script has the necessary permissions.\nThe type_perm parameter is used for reading ('r'), writing ('w') and execution ('x')", - "delete": "File.delete : Int\n\nDelete the file", + "delete": "File.delete : String\n\nDelete the file\n\nReturns a string (empty on success, or with an error on failure)", "get_folders": "File.get_folders : List[file]\n\nReturns an array of the folders contained in this object. This function is only available if this object is a folder, so it is advisable to first use the is_folder function before calling this method.", "get_files": "File.get_files : List[file]\n\nReturns an array of files (excluded folders) contained in this object. This function is only available if this object is a folder, so it is advisable to first use the is_folder function before calling this method.", "permissions": "File.permissions : String\n\nReturns a string with the current file permissions.", "owner": "File.owner : String\n\nReturns a string with the name of the file owner.", - "set_owner": "File.set_owner(string username, opt int isRecursive) : Int\n\nApply a owner to this file. By default, the owner does not apply recursively. To apply the owner recursively, the optional parameter must be 1.", + "set_owner": "File.set_owner(string username, opt int isRecursive) : String\n\nApply a owner to this file. By default, the owner does not apply recursively. To apply the owner recursively, the optional parameter must be 1.\n\nReturns a string (empty on success, or with an error on failure)", "group": "File.group : String\n\nReturns a string with the name of the group to which this file belongs.", - "set_group": "File.set_group(string groupname, opt int isRecursive) : Int\n\nApply a group to this file. By default, the group does not apply recursively. To apply the group recursively, the optional parameter must be 1.", + "set_group": "File.set_group(string groupname, opt int isRecursive) : String\n\nApply a group to this file. By default, the group does not apply recursively. To apply the group recursively, the optional parameter must be 1.\n\nReturns a string (empty on success, or with an error on failure)", "size": "File.size : Int\n\nReturns a string with the size of the file in bytes.", // Computer "get_ports": "Computer.get_ports : List[port]\n\nReturns an array of active ports on the computer.", "File": "Computer.File(string path) : File or Null\n\nReturns the file located in the given path, relative or absolute. The file returned can be a folder. If the file does not exist, it is returned null.", "create_folder": "Computer.create_folder(string path, string name) : Int\n\nCreate a folder in the specified path.", "is_network_active": "Computer.is_network_active : Int\n\nReturns true if the computer has internet access, false otherwise.", - "touch": "Computer.touch(string path, string name) : Int\n\nCreate an empty text file. Returns true if the file has been created, false otherwise.", + "touch": "Computer.touch(string path, string name) : Int or String\n\nCreate an empty text file.\n\nReturns 1 on success, or a string (containing an error) on failure", "show_procs": "Computer.show_procs : String\n\nReturns a string with the list of active processes on the machine.", "network_devices": "Computer.network_devices : String\n\nReturns a string with the list of network devices available on the computer.", - "change_password": "Computer.change_password(string username, string password) : Int\n\nChange the password of an existing user on the machine, for a new one.\nIt is necessary to be root to be able to execute the method. Returns true on success, false otherwise.", - "create_user": "Computer.create_user(string username, string password) : Int\n\nCreate a user on the machine, with the specified name and password. It is necessary to be root to be able to execute the method. Returns true on success, false otherwise.", - "delete_user": "Computer.delete_user(string username, opt bool deleteHome) : Int\n\nIt deletes the indicated user from the computer, also deleting its home folder optionally. \nBy default, if the optional parameter is not passed, the home folder will not be deleted.\nIt is necessary to be root to be able to execute the method. Returns true on success, false otherwise.", - "create_group": "Computer.create_group(string username, string group) : Int\n\nCreate a new group associated with an existing user on the machine. It is necessary to be root to be able to execute the method.", - "delete_group": "Computer.delete_group(string username, string group) : Int\n\nDelete the indicated user group. It is necessary to be root in order to execute this method.", + "change_password": "Computer.change_password(string username, string password) : Int or String\n\nChange the password of an existing user on the machine, for a new one.\nIt is necessary to be root to be able to execute the method.\n\nReturns 1 on success, or error string on failure", + "create_user": "Computer.create_user(string username, string password) : Int or String\n\nCreate a user on the machine, with the specified name and password. It is necessary to be root to be able to execute the method.\n\nReturns 1 on success, or error string on failure", + "delete_user": "Computer.delete_user(string username, opt bool deleteHome) : Int or String\n\nIt deletes the indicated user from the computer, also deleting its home folder optionally. \nBy default, if the optional parameter is not passed, the home folder will not be deleted.\nIt is necessary to be root to be able to execute the method.\n\nReturns 1 on success, or error string on failure", + "create_group": "Computer.create_group(string username, string group) : Int or String\n\nCreate a new group associated with an existing user on the machine. It is necessary to be root to be able to execute the method.\n\nReturns 1 on success, or error string on failure", + "delete_group": "Computer.delete_group(string username, string group) : Int or String\n\nDelete the indicated user group. It is necessary to be root in order to execute this method.\n\nReturns 1 on success, or error string on failure", "groups": "Computer.groups(string username) : String\n\nReturns a string with the list of groups created in the indicated user.", - "close_program": "Computer.close_program(int PID) : Int\n\nClose the program associated with the PID. To show the list of the running programs along with their PIDs use the ps command.", + "close_program": "Computer.close_program(int PID) : Int or String\n\nClose the program associated with the PID. To show the list of the running programs along with their PIDs use the ps command.\n\nReturns 1 on success, 0 if the process cannot be found, or an error string on failure to terminate the process", "wifi_networks": "Computer.wifi_networks(string netDevice) : List[string]\n\nReturns a list of the Wi-Fi networks that are available.", - "connect_wifi": "Computer.connect_wifi(string netDevice, string bssid, string essid, string password) : Int\n\nConnect to the indicated Wifi network. Returns true if the connection was successful.", + "connect_wifi": "Computer.connect_wifi(string netDevice, string bssid, string essid, string password) : Int or String or Null\n\nConnect to the indicated Wifi network. Returns true if the connection was successful.\n\nReturns 1 on successful connection, null if the network cannot be found, or an error string on connection failure", "connect_ethernet": "Notice: Ethernet is currently disabled in multiplayer on both public and nightly builds!\n\nComputer.connect_ethernet(string netDevice, string localIp, string gateway)\nSet up a new IP address on the machine through the ethernet connection.\nReturns a string with the error message if the connection failed. In case of success, an empty string is returned.", "network_gateway": "Computer.network_gateway : String\n\nReturns a string with the gateway configured on the computer.", "active_net_card": "Computer.active_net_card : String\n\nReturns a string with the keyword WIFI if the current device is connected to a router by WiFi, if it is connected by cable a string with the keyword ETHERNET is returned.", // General "typeof": "typeof(any object) : String\n\nReturns a string with the type of the object passed as a parameter.", "get_router": "get_router(opt string ip) : Router\n\nReturns the router whose public IP matches, otherwise returns null.\nIf the ip_address parameter is not specified, returns the router to which the computer executing this command is connected.", - "get_switch": "get_switch(string ip) : Router?\n\nReturns the switch on the local network whose IP matches, otherwise it returns null.", + "get_switch": "get_switch(string ip) : Router or Null\n\nReturns the switch on the local network whose IP matches, otherwise it returns null.", "nslookup": "nslookup(string website) : String\n\nReturns the IP address that is behind the web address that has been provided.", "print": "print(string text) : Null\n\nPrint on the Terminal the message.", - "clear_screen": "clear_screen : Null\n\nDelete any text from the terminal.", + "clear_screen": "clear_screen : Null\n\nClears all text from the terminal.", "active_user": "active_user : String\n\nReturns a string with the name of the user who is executing the script.", "home_dir": "home_dir : String\n\nReturns a string with home folder path of the user who is executing the script.", "get_shell": "get_shell(opt string username, opt string password) : Shell\n\nReturns the shell that is executing the script if it is called without parameters. \nPassing a username and password, it returns a shell with those credentials if are correct.", @@ -632,8 +674,8 @@ var HoverData = { "include_lib": "include_lib(string path) : any\n\nIncludes an external library to be used in scripting. If the library has been included correctly, it will return an object of corresponding type with the library, null otherwise", "import_code": "import_code(string absolutePath) : any\n\nIncludes external code into the current code. Can be used to split code in multiple files.\nNote: The code will be added to the current code upon compiling.", "exit": "exit(opt string message) : Null\n\nStops the execution of the script at the time this method is executed. Optionally you can pass a string as a message that will be printed in the terminal when the program ends.", - "user_mail_address": "Returns a string with the user's email address that is executing this script.\nThis is only defined on a player's home computer.", - "user_bank_number": "Returns a string with the bank account number of the user who is executing this script.\nThis is only defined on a player's home computer.", + "user_mail_address": "user_mail_address : String\n\nReturns a string with the user's email address that is executing this script.\nThis is only defined on a player's home computer.", + "user_bank_number": "user_bank_number : String\n\nReturns a string with the bank account number of the user who is executing this script.\nThis is only defined on a player's home computer.", "whois": "whois(string ip) : String\n\nShows the administrator information behind the IP provided.", "wait": "wait(float seconds) : Null\n\nPauses the script for the indicated time. If duration is not specified, the default value is 1 second.", "command_info": "command_info(string command) : String\n\nReturns the information of common commands of the Operating System, such as mkdir, whois, etc.", @@ -667,9 +709,9 @@ var HoverData = { "pi": "pi : float\n\nReturns 3.14159265358979 (this will probably never be useful!)", // Strings "remove": [ - "String.remove(string) : String\n\nReturns the string without the first occurrence of the provided input.", + "String.remove(substr) : String\n\nReturns the string without the first occurrence of the provided substring.", "Map.remove(key) : Map\n\nReturns the map without the first occurrence of the provided input.", - "List.remove(value) : List\n\nReturns the list without the first occurrence of the provided input." + "List.remove(index) : List\n\nReturns the list without the first occurrence of the provided input." ], "hasIndex": [ "String.hasIndex(index) : Int\n\nReturns 1 if the index exists. Returns 0 otherise.", @@ -677,14 +719,14 @@ var HoverData = { "Map.hasIndex(index) : Int\n\nReturns 1 if the index exists. Returns 0 otherise." ], "indexOf": [ - "String.indexOf(string, opt begin) : Int\n\nReturns the first index of the provided input with the string. Optionally searches after begin.", - "List.indexOf(value, opt begin) : Int\n\nReturns the index of the provided value. Optionally searches after begin.", - "Map.indexOf(value, opt begin) : Int\n\nReturns the first index of the provided input with the string. Optionally searches after begin." + "String.indexOf(string, opt begin) : Int or Null\n\nReturns the first index of the provided input with the string. Optionally searches after begin. Returns Null if not found.", + "List.indexOf(value, opt begin) : Int or Null\n\nReturns the index of the provided value. Optionally searches after begin. Returns Null if not found.", + "Map.indexOf(value, opt begin) : Int or Null\n\nReturns the first index of the provided input with the string. Optionally searches after begin. Returns Null if not found." ], - "lastIndexOf": "String.lastIndexOf(string) : Int\n\nReturns the last index of the provided input with the string. Optionally searches after begin.", + "lastIndexOf": "String.lastIndexOf(string) : Int or Null\n\nReturns the last index of the provided input with the string. Optionally searches after begin. Returns Null if not found.", "slice": [ "slice(String, opt start, opt end) : String\n\nReturns the provided string from index start to index end.", - "slice(List, opt start, opt end) : String\n\nReturns the provided list from index start to index end.", + "slice(List, opt start, opt end) : List\n\nReturns the provided list from index start to index end.", ], "split": "String.split(seperator) : List[string]\n\nReturns a list object of substrings.", "replace": "String.replace(old,new) : String\n\nReturns the string with any instances of new replaced with old.", diff --git a/syntaxes/greyscript.tmLanguage.json b/syntaxes/greyscript.tmLanguage.json index 4de92d0..92e0673 100644 --- a/syntaxes/greyscript.tmLanguage.json +++ b/syntaxes/greyscript.tmLanguage.json @@ -24,15 +24,19 @@ }, { "name": "support.class", - "match": "\\b(Shell|Computer|File|Router|NetSession|Metaxploit|Metalib|Port|Crypto|int|float|string|String|Int|Float|bool|map|Map|list|List)\\b" + "match": "\\b(Shell|FtpShell|Computer|File|Router|NetSession|Metaxploit|Metalib|Port|Crypto|int|float|string|String|Int|Float|bool|map|Map|list|List)\\b" }, { "name": "keyword.api.shell", - "match": "\\.(host_computer|scp|start_terminal|build|put|connect_service|launch)" + "match": "\\.(host_computer|scp|start_terminal|build|put|connect_service|launch|apt_show|apt_search|apt_update|apt_add_repo|apt_install|apt_check_upgrade)" + }, + { + "name": "keyword.api.ftpshell", + "match": "\\.(host_computer|start_terminal|put)" }, { "name": "keyword.api.computer", - "match": "\\.(File|public_ip|lan_ip|get_router|touch|create_user|delete_user|create_group|delete_group|active_net_card|change_password|close_program|connect_ethernet|connect_wifi|current_path|get_ports|groups|is_network_active|network_devices|network_gateway|show_procs|wifi_networks|create_folder)" + "match": "\\.(File|public_ip|local_ip|get_router|touch|create_user|delete_user|create_group|delete_group|active_net_card|change_password|close_program|connect_ethernet|connect_wifi|current_path|get_ports|groups|is_network_active|network_devices|network_gateway|show_procs|wifi_networks|create_folder)" }, { "name": "keyword.api.file",