File tree Expand file tree Collapse file tree 6 files changed +7
-222
lines changed
app/src/main/java/com/stealthcotper/networktools
main/java/com/stealthcopter/networktools
test/java/com/stealthcopter/networktools Expand file tree Collapse file tree 6 files changed +7
-222
lines changed Original file line number Diff line number Diff line change @@ -201,12 +201,12 @@ private void doPortScan() throws Exception {
201
201
202
202
// Perform synchronous port scan
203
203
appendResultsText ("PortScanning IP: " + ipAddress );
204
- ArrayList <Integer > openPorts = PortScan .onAddress (ipAddress ).setPort (21 ).doScan ();
204
+ ArrayList <Integer > openPorts = PortScan .onAddress (ipAddress ).setPort (21 ).setMethodTCP (). doScan ();
205
205
206
206
final long startTimeMillis = System .currentTimeMillis ();
207
207
208
208
// Perform an asynchronous port scan
209
- PortScan .onAddress (ipAddress ).setPortsAll ().doScan (new PortScan .PortListener () {
209
+ PortScan .onAddress (ipAddress ).setPortsAll ().setMethodTCP (). doScan (new PortScan .PortListener () {
210
210
@ Override
211
211
public void onResult (int portNo , boolean open ) {
212
212
if (open ) appendResultsText ("Open: " + portNo );
Original file line number Diff line number Diff line change @@ -26,6 +26,6 @@ subprojects {
26
26
ext. targetSdkVer = 27
27
27
ext. supportLibVer = " 27.1.1"
28
28
29
- ext. versionName = " 0.3.08 "
30
- ext. versionCode = 13
29
+ ext. versionName = " 0.4.0 "
30
+ ext. versionCode = 14
31
31
}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ private MACTools() {
18
18
*
19
19
* @param macAddress - the MAC address to check
20
20
* @return - true if it is valid MAC address in IEEE802 format (either hyphen or colon seperated)
21
- * eg: "01:23:45:67:89:AB:CD:EF " or "01-23-45-67-89-AB-CD-EF "
21
+ * eg: "01:23:45:67:89:AB" or "01-23-45-67-89-AB"
22
22
*/
23
23
public static boolean isValidMACAddress (final String macAddress ) {
24
24
return macAddress != null && PATTERN_MAC .matcher (macAddress ).matches ();
@@ -29,7 +29,7 @@ public static boolean isValidMACAddress(final String macAddress) {
29
29
* Convert a MAC string to bytes
30
30
*
31
31
* @param macStr - MAC string in IEEE802 format (either hyphen or colon seperated)
32
- * eg: "01:23:45:67:89:AB:CD:EF " or "01-23-45-67-89-AB-CD-EF "
32
+ * eg: "01:23:45:67:89:AB" or "01-23-45-67-89-AB"
33
33
* @return - MAC formatted in bytes
34
34
* @throws IllegalArgumentException - if mac address is invalid
35
35
*/
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ public void testIsIPv6AddressesStandard() {
81
81
}
82
82
83
83
@ Test
84
- @ Ignore // Not working yet, possibly not correct pattern for compression
84
+ @ Ignore // Recheck this, either test is broken or regex is wrong
85
85
public void testIPv6HexCompressedAddress () {
86
86
for (String address : getIPv6AddressesHexCompresed ()) {
87
87
assertTrue (IPTools .isIPv6HexCompressedAddress (address ));
You can’t perform that action at this time.
0 commit comments