/** * * @param jc * @param config * @return */ public static boolean isPrintHelpForCommand(JCommander jc, TLSDelegateConfig config) { return config.getGeneralDelegate().isHelp(); } }
/** * Adjusts the Config according to the specified values. * * @param config * Config to adjust */ @Override public void applyDelegate(Config config) { super.applyDelegate(config); } }
public static void main(String[] args) { ServerCommandConfig config = new ServerCommandConfig(new GeneralDelegate()); JCommander commander = new JCommander(config); try { commander.parse(args); if (config.getGeneralDelegate().isHelp()) { commander.usage(); return;
@Override public void applyDelegate(Config config) { Security.addProvider(new BouncyCastleProvider()); if (isDebug()) { Configurator.setAllLevels("de.rub.nds.tlsattacker", Level.DEBUG); } else if (quiet) { Configurator.setAllLevels("de.rub.nds.tlsattacker", Level.OFF); } LOGGER.debug("Using the following security providers"); for (Provider p : Security.getProviders()) { LOGGER.debug("Provider {}, version, {}", p.getName(), p.getVersion()); } // remove stupid Oracle JDK security restriction (otherwise, it is not // possible to use strong crypto with Oracle JDK) UnlimitedStrengthEnabler.enable(); } }
public static void main(String args[]) { ClientCommandConfig config = new ClientCommandConfig(new GeneralDelegate()); JCommander commander = new JCommander(config); try { commander.parse(args); if (config.getGeneralDelegate().isHelp()) { commander.usage(); return; } ListDelegate list = (ListDelegate) config.getDelegate(ListDelegate.class); if (list.isSet()) { list.plotListing(); return; } try { Config tlsConfig = config.createConfig(); TlsClient client = new TlsClient(); client.startTlsClient(tlsConfig); } catch (Exception E) { LOGGER.error("Encountered an uncaught Exception aborting. See debug for more info.", E); } } catch (ParameterException E) { LOGGER.error("Could not parse provided parameters. " + E.getLocalizedMessage()); LOGGER.debug(E); commander.usage(); } }
public void run() throws ParameterException, WorkflowExecutionException, ConfigurationException { MitmCommandConfig cmdConfig = new MitmCommandConfig(new GeneralDelegate()); JCommander commander = new JCommander(cmdConfig); if (cmdConfig.getGeneralDelegate().isHelp()) { commander.usage(); return;
jc.addCommand(DrownCommandConfig.COMMAND, drownConfig); jc.parse(args); if (generalDelegate.isHelp() || jc.getParsedCommand() == null) { if (jc.getParsedCommand() == null) { jc.usage();
public void run() throws ParameterException, ConfigurationException, JAXBException, IOException { TraceToolCommandConfig cmdConfig = new TraceToolCommandConfig(new GeneralDelegate()); JCommander commander = new JCommander(cmdConfig); if (cmdConfig.getGeneralDelegate().isHelp()) { commander.usage(); return;