Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
PortScanner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mohammad.salama
PortScanner
Commits
f767693b
Commit
f767693b
authored
Nov 13, 2023
by
mohammad.salama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working with user Input
parent
e4565cdd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
6 deletions
+46
-6
workspace.xml
.idea/workspace.xml
+19
-1
Driver.class
out/production/JavaPortScanner-master/driver/Driver.class
+0
-0
Driver.java
src/driver/Driver.java
+27
-5
No files found.
.idea/workspace.xml
View file @
f767693b
<?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
out/production/JavaPortScanner-master/driver/Driver.class
View file @
f767693b
No preview for this file type
src/driver/Driver.java
View file @
f767693b
...
...
@@ -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);
}
}
*/
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment