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 {
201201
202202 // Perform synchronous port scan
203203 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 ();
205205
206206 final long startTimeMillis = System .currentTimeMillis ();
207207
208208 // Perform an asynchronous port scan
209- PortScan .onAddress (ipAddress ).setPortsAll ().doScan (new PortScan .PortListener () {
209+ PortScan .onAddress (ipAddress ).setPortsAll ().setMethodTCP (). doScan (new PortScan .PortListener () {
210210 @ Override
211211 public void onResult (int portNo , boolean open ) {
212212 if (open ) appendResultsText ("Open: " + portNo );
Original file line number Diff line number Diff line change @@ -26,6 +26,6 @@ subprojects {
2626 ext. targetSdkVer = 27
2727 ext. supportLibVer = " 27.1.1"
2828
29- ext. versionName = " 0.3.08 "
30- ext. versionCode = 13
29+ ext. versionName = " 0.4.0 "
30+ ext. versionCode = 14
3131}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ private MACTools() {
1818 *
1919 * @param macAddress - the MAC address to check
2020 * @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"
2222 */
2323 public static boolean isValidMACAddress (final String macAddress ) {
2424 return macAddress != null && PATTERN_MAC .matcher (macAddress ).matches ();
@@ -29,7 +29,7 @@ public static boolean isValidMACAddress(final String macAddress) {
2929 * Convert a MAC string to bytes
3030 *
3131 * @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"
3333 * @return - MAC formatted in bytes
3434 * @throws IllegalArgumentException - if mac address is invalid
3535 */
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() {
8181 }
8282
8383 @ Test
84- @ Ignore // Not working yet, possibly not correct pattern for compression
84+ @ Ignore // Recheck this, either test is broken or regex is wrong
8585 public void testIPv6HexCompressedAddress () {
8686 for (String address : getIPv6AddressesHexCompresed ()) {
8787 assertTrue (IPTools .isIPv6HexCompressedAddress (address ));
You can’t perform that action at this time.
0 commit comments