njitclient: bump to latest git HEAD

This commit is contained in:
CN_SZTL 2020-01-22 09:54:13 +08:00
parent d6cf22f2b3
commit 52d630e7fc
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
33 changed files with 391 additions and 465 deletions

0
package/jsda/njitclient/Install.html Executable file → Normal file
View File

View File

0
package/jsda/njitclient/Makefile.am Executable file → Normal file
View File

0
package/jsda/njitclient/ReadMe.html Executable file → Normal file
View File

0
package/jsda/njitclient/configure.ac Executable file → Normal file
View File

0
package/jsda/njitclient/documents/Documents.html Executable file → Normal file
View File

0
package/jsda/njitclient/src-gui/gtkgui/AUTHORS Executable file → Normal file
View File

0
package/jsda/njitclient/src-gui/gtkgui/COPYING Executable file → Normal file
View File

0
package/jsda/njitclient/src-gui/gtkgui/ChangeLog Executable file → Normal file
View File

0
package/jsda/njitclient/src-gui/gtkgui/HACKING Executable file → Normal file
View File

0
package/jsda/njitclient/src-gui/gtkgui/Makefile.am Executable file → Normal file
View File

0
package/jsda/njitclient/src-gui/gtkgui/NEWS Executable file → Normal file
View File

0
package/jsda/njitclient/src-gui/gtkgui/configure.ac Executable file → Normal file
View File

View File

0
package/jsda/njitclient/src-gui/qt4gui/ReadMe.html Executable file → Normal file
View File

0
package/jsda/njitclient/src-gui/qt4gui/qt4gui.pro Executable file → Normal file
View File

0
package/jsda/njitclient/src/Makefile.am Executable file → Normal file
View File

0
package/jsda/njitclient/src/RefreshIP.py Normal file → Executable file
View File

File diff suppressed because it is too large Load Diff

0
package/jsda/njitclient/src/configure.ac Executable file → Normal file
View File

View File

@ -5,13 +5,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/* 子函数声明 */
int Authentication(const char *UserName, const char *Password, const char *DeviceName, const char *Version, const char *Key);
void convert(char *dest, char const *src);
int Authentication(const char *UserName, const char *Password, const char *DeviceName);
/**
* main()
@ -28,8 +27,6 @@ int main(int argc, char *argv[])
char *UserName;
char *Password;
char *DeviceName;
char *Version;
char *Key;
/* 检查当前是否具有root权限 */
if (getuid() != 0) {
@ -40,56 +37,25 @@ int main(int argc, char *argv[])
}
/* 检查命令行参数格式 */
if (argc<3 || argc>6) {
if (argc<3 || argc>4) {
fprintf(stderr, "命令行参数错误!\n");
fprintf(stderr, "正确的调用格式例子如下:\n");
fprintf(stderr, " %s username password\n", argv[0]);
fprintf(stderr, " %s username password eth0\n", argv[0]);
fprintf(stderr, " %s username password eth0 version key\n", argv[0]);
fprintf(stderr, "(注若不指明网卡默认情况下将使用eth0.2)\n");
fprintf(stderr, " %s username password eth1\n", argv[0]);
fprintf(stderr, "(注若不指明网卡默认情况下将使用eth0)\n");
exit(-1);
} else if (argc == 4) {
DeviceName = argv[3]; // 允许从命令行指定设备名
} else {
if (argc > 3) {
DeviceName = argv[3]; // 允许从命令行指定设备名
} else {
DeviceName = "eth0.2"; // 缺省情况下使用的设备
}
if (argc > 5) {
Version = (char *)malloc(32 * sizeof(char));
convert(Version, argv[4]);
Key = argv[5];
} else {
Version = "CH\x11V7.10-0313";
Key = "Oly5D62FaE94W7";
}
DeviceName = "eth0"; // 缺省情况下使用的设备
}
UserName = argv[1];
Password = argv[2];
/* 调用子函数完成802.1X认证 */
Authentication(UserName, Password, DeviceName, Version, Key);
Authentication(UserName, Password, DeviceName);
return (0);
}
void convert(char *dest, char const *src)
{
int i = 0, j = 0;
int len = strlen(src);
while (i < len) {
if (src[i] == '\\' && i+3 < len && src[i+1] == 'x') {
char s[3];
s[0] = src[i+2];
s[1] = src[i+3];
s[2] = 0;
char c;
sscanf(s, "%x", &c);
dest[j++] = c;
i += 4;
} else {
dest[j++] = src[i++];
}
}
dest[j] = 0;
}

0
package/jsda/njitclient/src/md5-buildin/Makefile.am Executable file → Normal file
View File

0
package/jsda/njitclient/src/md5-buildin/configure.ac Executable file → Normal file
View File

View File

@ -415,7 +415,7 @@ void HASH_BLOCK_DATA_ORDER (MD5_CTX *c, const void *p, size_t num)
a=ROTATE(a,s); \
a+=b; };
const char MD5_version[]="MD5" OPENSSL_VERSION_PTEXT;
const char MD5_version[]="MD5";
/* Implemented from RFC1321 The MD5 Message-Digest Algorithm
*/

0
package/jsda/njitclient/src/tests/ifchk.mk Executable file → Normal file
View File

0
package/jsda/njitclient/src/tests/md5test.mk Executable file → Normal file
View File

View File

@ -1 +0,0 @@
直接将本目录放到openwrt\package目录中即可在make menuconfig中的Network项目中找到njit8021xclient