parent
de14b0cb9e
commit
0dcb4ab963
File diff suppressed because it is too large
Load Diff
|
|
@ -1,8 +1,8 @@
|
|||
build.xml.data.CRC32=4d236977
|
||||
build.xml.script.CRC32=a2932288
|
||||
build.xml.stylesheet.CRC32=8064a381@1.75.2.48
|
||||
build.xml.stylesheet.CRC32=f85dc8f2@1.96.0.48
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=4d236977
|
||||
nbproject/build-impl.xml.script.CRC32=06e81169
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
|
||||
nbproject/build-impl.xml.script.CRC32=9c8a587c
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.96.0.48
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
compile.on.save=true
|
||||
do.depend=false
|
||||
do.jar=true
|
||||
javac.debug=true
|
||||
javadoc.preview=true
|
||||
user.properties.file=/home/mh/.netbeans/8.0.2/build.properties
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group>
|
||||
<file>file:/home/mh/Dvp/prj/MtUtils/MikroTikAPI/src/com/eightOceans/mikroTik/Utils.java</file>
|
||||
<file>file:/home/mh/Dvp/prj/MtUtils/MikroTikAPI/src/com/eightOceans/mikroTik/ops/AccessListEntry.java</file>
|
||||
<file>file:/home/mh/Dvp/prj/MtUtils/MikroTikAPI/src/com/eightOceans/mikroTik/ops/Wireless.java</file>
|
||||
<file>file:/home/mh/Dvp/prj/MtUtils/MikroTikAPI/src/com/eightOceans/mikroTik/ApiConnection.java</file>
|
||||
<file>file:/home/mh/Dvp/prj/MtUtils/MikroTikAPI/src/com/eightOceans/mikroTik/MtSentence.java</file>
|
||||
<file>file:/home/mh/Dvp/prj/MtUtils/MikroTikAPI/src/com/eightOceans/mikroTik/ops/OPs.java</file>
|
||||
</group>
|
||||
</open-files>
|
||||
</project-private>
|
||||
|
|
@ -19,8 +19,12 @@ build.test.results.dir=${build.dir}/test/results
|
|||
#debug.transport=dt_socket
|
||||
debug.classpath=\
|
||||
${run.classpath}
|
||||
debug.modulepath=\
|
||||
${run.modulepath}
|
||||
debug.test.classpath=\
|
||||
${run.test.classpath}
|
||||
debug.test.modulepath=\
|
||||
${run.test.modulepath}
|
||||
# Files in build.classes.dir which should be excluded from distribution jar
|
||||
dist.archive.excludes=
|
||||
# This directory is removed when the project is cleaned:
|
||||
|
|
@ -35,6 +39,9 @@ javac.classpath=
|
|||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.external.vm=false
|
||||
javac.modulepath=
|
||||
javac.processormodulepath=
|
||||
javac.processorpath=\
|
||||
${javac.classpath}
|
||||
javac.source=1.8
|
||||
|
|
@ -42,11 +49,14 @@ javac.target=1.8
|
|||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
javac.test.modulepath=\
|
||||
${javac.modulepath}
|
||||
javac.test.processorpath=\
|
||||
${javac.test.classpath}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.encoding}
|
||||
javadoc.html5=false
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
|
|
@ -55,6 +65,8 @@ javadoc.splitindex=true
|
|||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
jlink.launcher=false
|
||||
jlink.launcher.name=MikroTikAPI
|
||||
main.class=com.eightOceans.mikroTik.sample.TestApp
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
mkdist.disabled=true
|
||||
|
|
@ -62,13 +74,13 @@ platform.active=default_platform
|
|||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
# Space-separated list of JVM arguments used when running the project.
|
||||
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
|
||||
# To set system properties for unit tests define test-sys-prop.name=value:
|
||||
run.jvmargs=
|
||||
run.modulepath=\
|
||||
${javac.modulepath}
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
run.test.modulepath=\
|
||||
${javac.test.modulepath}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
||||
test.src.dir=test
|
||||
|
|
|
|||
|
|
@ -80,6 +80,13 @@ public class TestApp {
|
|||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("- Starting test app");
|
||||
|
||||
if (args.length >= 3) {
|
||||
host = args[0];
|
||||
user = args[1];
|
||||
pass = args[2];
|
||||
}
|
||||
|
||||
ApiConnection conn = new ApiConnection();
|
||||
|
||||
NextOp op = NextOp.CONNECT;
|
||||
|
|
|
|||
|
|
@ -11,16 +11,26 @@ import java.util.logging.Logger;
|
|||
*/
|
||||
public class TestApp {
|
||||
|
||||
static String user = "admin";
|
||||
static String password = "XXXX";
|
||||
static String address = "192.168.88.1";
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
ApiConn conn = new ApiConn("192.168.61.254", 8729, ApiConn.SSLMode.Weak);
|
||||
|
||||
if (args.length >= 3) {
|
||||
address = args[0];
|
||||
user = args[1];
|
||||
password = args[2];
|
||||
}
|
||||
|
||||
ApiConn conn = new ApiConn(address, 8729, ApiConn.SSLMode.Weak);
|
||||
if (!conn.isConnected()) {
|
||||
conn.start();
|
||||
try {
|
||||
conn.join(2000);
|
||||
if (conn.isConnected()) {
|
||||
conn.login("admin", new String(password).toCharArray());
|
||||
conn.login(user, new String(password).toCharArray());
|
||||
conn.sendCommand("/ip/address/print");
|
||||
DataReceiver dataRec = new DataReceiver(conn);
|
||||
dataRec.start();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
MtWifiUserConfig 0.2.0
|
||||
======================
|
||||
|
||||
- Java/Netbeans project
|
||||
|
||||
- After building output can be found in the dists folder
|
||||
|
||||
- Start with java -jar
|
||||
|
||||
- Reads from config.properties, and send this to the Mikrotik-APs AccessList,
|
||||
|
|
@ -9,6 +13,32 @@ MtWifiUserConfig 0.2.0
|
|||
used if a connecting device is not found in the access list!
|
||||
|
||||
- The AP_PWPREF is the first part of the password for the user used to login
|
||||
to the AP. The second part is asked to be entered when running the program
|
||||
to the AP. The second part is currently asked to be entered when running the program.
|
||||
|
||||
- Binary snapshots can be found in snapshots
|
||||
|
||||
Sample config.properties (also see repos):
|
||||
|
||||
```
|
||||
AP_1=192.168.88.1
|
||||
AP_1_PORT=8729
|
||||
AP_1_USER=rcfg
|
||||
AP_1_PWPREF=0a
|
||||
|
||||
#AP_2=192.168.88.2
|
||||
#AP_2_PORT=8729
|
||||
#AP_2_USER=rcfg
|
||||
#AP_2_PWPREF=0b
|
||||
|
||||
DEV_1=Notebook Alt
|
||||
DEV_1_MAC=01:01:01:01:01:03
|
||||
DEV_1_KEY=saldk9012LLada
|
||||
DEV_1_IFACE=wlan2|wlan1-gateway
|
||||
DEV_1_MINDB=-70
|
||||
|
||||
DEV_2=MH IPAD
|
||||
DEV_2_MAC=9C:04:EB:98:A5:67
|
||||
DEV_2_KEY=lalalala
|
||||
DEV_2_IFACE=wlan2
|
||||
DEV_2_MINDB=-73
|
||||
|
||||
```
|
||||
|
|
@ -1,20 +1,19 @@
|
|||
AP_1=192.168.61.220
|
||||
AP_1=192.168.88.1
|
||||
AP_1_PORT=8729
|
||||
AP_1_USER=rcfg
|
||||
AP_1_PWPREF=0a
|
||||
|
||||
#AP_2=192.168.61.220
|
||||
#AP_2=192.168.88.2
|
||||
#AP_2_PORT=8729
|
||||
#AP_2_USER=rcfg
|
||||
#AP_2_PWPREF=0a
|
||||
|
||||
DEV_1=MK Iphone 7
|
||||
DEV_1=Notebook Alt
|
||||
DEV_1_MAC=01:01:01:01:01:03
|
||||
DEV_1_KEY=saldk9012LLada
|
||||
DEV_1_IFACE=wlan2|wlan1-gateway
|
||||
DEV_1_MINDB=-70
|
||||
|
||||
|
||||
DEV_2=MH IPAD
|
||||
DEV_2_MAC=9C:04:EB:98:A5:67
|
||||
DEV_2_KEY=lalalala
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,8 +1,8 @@
|
|||
build.xml.data.CRC32=d3fd163a
|
||||
build.xml.script.CRC32=d782f8ff
|
||||
build.xml.stylesheet.CRC32=8064a381@1.75.2.48
|
||||
build.xml.stylesheet.CRC32=f85dc8f2@1.96.0.48
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=d3fd163a
|
||||
nbproject/build-impl.xml.script.CRC32=0d613bb8
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
|
||||
nbproject/build-impl.xml.script.CRC32=dc1ceff8
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.96.0.48
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
application.args=0a0a
|
||||
compile.on.save=true
|
||||
do.depend=false
|
||||
do.jar=true
|
||||
javac.debug=true
|
||||
javadoc.preview=true
|
||||
user.properties.file=/home/mh/.netbeans/8.0.2/build.properties
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group>
|
||||
<file>file:/home/mh/Dvp/prj/MtUtils/MtWifiUserConfig/config.properties</file>
|
||||
<file>file:/home/mh/Dvp/prj/MtUtils/MtWifiUserConfig/src/com/eightOceans/mtWifiUserConfig/Main.java</file>
|
||||
<file>file:/home/mh/Dvp/prj/MtUtils/MtWifiUserConfig/src/com/eightOceans/mtWifiUserConfig/ApDef.java</file>
|
||||
</group>
|
||||
</open-files>
|
||||
</project-private>
|
||||
|
|
@ -19,8 +19,12 @@ build.test.results.dir=${build.dir}/test/results
|
|||
#debug.transport=dt_socket
|
||||
debug.classpath=\
|
||||
${run.classpath}
|
||||
debug.modulepath=\
|
||||
${run.modulepath}
|
||||
debug.test.classpath=\
|
||||
${run.test.classpath}
|
||||
debug.test.modulepath=\
|
||||
${run.test.modulepath}
|
||||
# Files in build.classes.dir which should be excluded from distribution jar
|
||||
dist.archive.excludes=
|
||||
# This directory is removed when the project is cleaned:
|
||||
|
|
@ -38,6 +42,8 @@ javac.classpath=\
|
|||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.modulepath=
|
||||
javac.processormodulepath=
|
||||
javac.processorpath=\
|
||||
${javac.classpath}
|
||||
javac.source=1.8
|
||||
|
|
@ -45,6 +51,8 @@ javac.target=1.8
|
|||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
javac.test.modulepath=\
|
||||
${javac.modulepath}
|
||||
javac.test.processorpath=\
|
||||
${javac.test.classpath}
|
||||
javadoc.additionalparam=
|
||||
|
|
@ -85,9 +93,13 @@ run.classpath=\
|
|||
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
|
||||
# To set system properties for unit tests define test-sys-prop.name=value:
|
||||
run.jvmargs=
|
||||
run.modulepath=\
|
||||
${javac.modulepath}
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
run.test.modulepath=\
|
||||
${javac.test.modulepath}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
||||
test.src.dir=test
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
0.2.0
|
||||
=====
|
||||
- First version
|
||||
|
||||
Binary file not shown.
|
|
@ -1,29 +0,0 @@
|
|||
AP_1=192.168.61.220
|
||||
AP_1_PORT=8729
|
||||
AP_1_USER=rcfg
|
||||
AP_1_PWPREF=0a
|
||||
|
||||
#AP_2=192.168.61.220
|
||||
#AP_2_PORT=8729
|
||||
#AP_2_USER=rcfg
|
||||
#AP_2_PWPREF=0a
|
||||
|
||||
DEV_1=MK Iphone 7
|
||||
DEV_1_MAC=01:01:01:01:01:03
|
||||
DEV_1_KEY=saldk9012LLada
|
||||
DEV_1_IFACE=wlan2|wlan1-gateway
|
||||
DEV_1_MINDB=-70
|
||||
|
||||
|
||||
DEV_2=MH IPAD
|
||||
DEV_2_MAC=9C:04:EB:98:A5:67
|
||||
DEV_2_KEY=lalalala
|
||||
DEV_2_IFACE=wlan2
|
||||
DEV_2_MINDB=-73
|
||||
|
||||
DEV_3=MH Notebook
|
||||
DEV_3_MAC=03:01:01:01:01:08
|
||||
DEV_3_KEY=lalalala
|
||||
DEV_3_IFACE=wlan2
|
||||
DEV_3_MINDB=-75
|
||||
|
||||
18
README.md
18
README.md
|
|
@ -1,18 +1,26 @@
|
|||
MtUtils
|
||||
=======
|
||||
|
||||
Projects in Java for helping to manage Mikrotik-Routers
|
||||
Projects in Java for helping to manage Mikrotik-Routers.
|
||||
|
||||
As IDE Netbeans is used.
|
||||
|
||||
|
||||
|
||||
MikroTikAPI
|
||||
-----------
|
||||
|
||||
Based on community sources this is an enhanced version
|
||||
to access Mikrotik devices. There is a test project.
|
||||
API wrapping sample sources from the community/Mikrotik wiki to access Mikrotik devices.
|
||||
There is a test project.
|
||||
|
||||
|
||||
MtWifiUserConfig
|
||||
----------------
|
||||
|
||||
Tool to upload Wifi-Accesslist to multiple APs to have per
|
||||
device(MAC)-WPA2-Preshared keys.
|
||||
Tool to upload Wifi-Accesslist to multiple APs. Specialty is that
|
||||
each client-device (specified by MAC-address) can have it's own
|
||||
WPA2-Preshared keys (instead to commonly known common WPA2-password
|
||||
for all devices)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue