Commit f767693b authored by mohammad.salama's avatar mohammad.salama

Working with user Input

parent e4565cdd
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="bc0e4876-bdca-4575-8e2f-e6d1b5942353" name="Changes" comment="" />
<list default="true" id="bc0e4876-bdca-4575-8e2f-e6d1b5942353" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/driver/Driver.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/driver/Driver.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
......@@ -14,10 +17,14 @@
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2Y3eB8NBMELXwFwVgbjdkQaMbzB" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
......@@ -93,4 +100,15 @@
</task>
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
</project>
\ No newline at end of file
......@@ -4,6 +4,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
......@@ -28,13 +29,34 @@ public class Driver {
private static final int SCAN_TIMEOUT = 200;
private static final int THREAD_COUNT = 128;
private static String[] takeInput()
{
String[] Args = new String[3];
System.out.println();
Scanner scanner = new Scanner(System.in);
System.out.println("Enter IPV4 to START scanning from");
Args[0] = scanner.nextLine();
System.out.println("Enter IPV4 to END scanning with");
Args[1] = scanner.nextLine();
String a="";
System.out.println("Enter Start PORT to START scanning from");
a = scanner.next();
Args[2] = a+"-";
System.out.println("Enter Start PORT to END scanning with");
a = scanner.next();
Args[2] += a;
System.out.println(Args[0]);
System.out.println(Args[1]);
System.out.println(Args[2]);
return Args;
}
public static void main(String[] args) {
// get a Target info from Parser
List<Target> targets = new ArrayList<>();
String[] Args = new String[3];
Args[0] = "8.8.8.4";
Args[1] = "8.8.8.9";
Args[2] = "19-80";
String[] Args = takeInput();
/*
try {
targets = Parser.run(Args);
} catch (InvalidUserInputException e) {
......@@ -47,6 +69,6 @@ public class Driver {
for (Target t : targets)
{
SingleIPDriver.start(t);
}
}*/
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment