package executors;

/**
 * Transform user commands in Nmap commands
 */
public class CommandCreator {

    public String createCommand(String userCommand) {
        String[] tokens =  userCommand.split("\\s+");

        switch(tokens[0]) {
            case "security":
                switch (tokens[1]) {
                    case "tls":
                        return "nmap --script ssl-enum-ciphers -p 443 " + tokens[2];
                    case "ecrypt2lvl":
                        return "nmap --script ssl-enum-ciphers -p 443 " + tokens[2];
                    case "open_ports":
                        return "nmap " + tokens[2];
                    default :
                        return null;
                }
            default :
                return null;
        }
    }
}

@@ -712,24 +712,109 @@
           %7D%0A
+            case %22availability2%22:%0A                return %22curl +X GET %22 + tokens%5B1%5D;%0A
             

Add availability2 comand, this command uses curl to do the availability check.