ubuntu如何用闪讯上网?
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- 夕阳西
- 帖子: 54
- 注册时间: 2008-10-03 18:39
ubuntu如何用闪讯上网?
学校里上网弄了个闪讯,ubuntu上不去网,找了一下也没找到能行的,希望谁能帮忙解决下……
好像有很多人都不知道什么是闪讯,有意向帮我解决的,可以去www.114school.cn看下。
就是在windows下,用闪讯上网要登录下才能上网的,如下图
好像有很多人都不知道什么是闪讯,有意向帮我解决的,可以去www.114school.cn看下。
就是在windows下,用闪讯上网要登录下才能上网的,如下图
上次由 夕阳西 在 2008-12-17 21:05,总共编辑 1 次。
I can't forget QMM
-
- 帖子: 410
- 注册时间: 2008-10-01 19:49
Re: ubuntu如何用闪讯上网?
为什么不直接找学校解决?不能让他们歧视linux。凭什么我们要上网就必须用windows?
- 夕阳西
- 帖子: 54
- 注册时间: 2008-10-03 18:39
Re: ubuntu如何用闪讯上网?
liangliang 写了:为什么不直接找学校解决?不能让他们歧视linux。凭什么我们要上网就必须用windows?
说得有道理,可能得找电信,让他们做一个闪讯,支持linux的
I can't forget QMM
-
- 帖子: 2
- 注册时间: 2008-12-18 18:44
Re: ubuntu如何用闪讯上网?
我也为这事发愁呢,Ubuntu安装号了,就不能联网升级!!!
- pcbird
- 帖子: 2337
- 注册时间: 2008-12-19 13:44
- 来自: 东8区
- haoyounbbl
- 帖子: 160
- 注册时间: 2008-12-24 0:59
Re: ubuntu如何用闪讯上网?
我是NBU的,我用路由器上的夕阳西 写了:学校里上网弄了个闪讯,ubuntu上不去网,找了一下也没找到能行的,希望谁能帮忙解决下……
好像有很多人都不知道什么是闪讯,有意向帮我解决的,可以去www.114school.cn看下。
就是在windows下,用闪讯上网要登录下才能上网的,如下图
- ykswang
- 帖子: 50
- 注册时间: 2007-10-25 13:13
- 联系:
Re: ubuntu如何用闪讯上网?
1、新建一个C文件:snplugin.c
代码如下:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <pppd/pppd.h>
#include <pppd/md5.h>
typedef unsigned char byte;
char pppd_version[] = VERSION;
static int is_name_modified = 0;
static char pwd[MAXSECRETLEN] = {0};
static option_t options[] = {
{ "pwd", o_string, pwd,
"pwd",
OPT_STATIC, NULL, MAXSECRETLEN-1 },
{ NULL }
};
void getPIN(byte *userName, byte *PIN) {
//var
int i;//循环变量
long timedivbyfive;//时间除以五
time_t timenow;//当前时间,从time()获得
byte RADIUS[16];//凑位字符
byte timeByte[4];//时间 div 5
byte beforeMD5[32];//时间 div 5+用户名+凑位
MD5_CTX md5;//MD5结构体
byte afterMD5[16];//MD5输出
byte MD501H[2]; //MD5前两位
byte MD501[3];
byte timeHash[4]; //时间div5经过第一次转后后的值
byte temp[32]; //第一次转换时所用的临时数组
byte PIN27[6]; //PIN的2到7位,由系统时间转换
//code
memcpy(RADIUS, "chongqingradius1", 16);
timenow = time(NULL);
timedivbyfive = timenow / 5;
for(i = 0; i < 4; i++) {
timeByte = (byte)(timedivbyfive >> (8 * (3 - i)) & 0xFF);
}
for(i = 0; i < 4; i++) {
beforeMD5= timeByte;
}
for(i = 4; i < 16; i++) {
beforeMD5 = userName[i-4];
}
for(i = 16; i < 32; i++){
beforeMD5 = RADIUS[i-16];
}
MD5_Init(&md5);
MD5_Update (&md5, beforeMD5, 32);
MD5_Final (afterMD5, &md5);
MD501H[0] = afterMD5[0] >> 4 & 0xF;
MD501H[1] = afterMD5[0] & 0xF;
sprintf(MD501,"%x%x",MD501H[0],MD501H[1]);
for(i = 0; i < 32; i++) {
temp = timeByte[(31 - i) / 8] & 1;
timeByte[(31 - i) / 8] = timeByte[(31 - i) / 8] >> 1;
}
for (i = 0; i < 4; i++) {
timeHash = temp * 128 + temp[4 + i] * 64 + temp[8 + i]
* 32 + temp[12 + i] * 16 + temp[16 + i] * 8 + temp[20 + i]
* 4 + temp[24 + i] * 2 + temp[28 + i];
}
temp[1] = (timeHash[0] & 3) << 4;
temp[0] = (timeHash[0] >> 2) & 0x3F;
temp[2] = (timeHash[1] & 0xF) << 2;
temp[1] = (timeHash[1] >> 4 & 0xF) + temp[1];
temp[3] = timeHash[2] & 0x3F;
temp[2] = ((timeHash[2] >> 6) & 0x3) + temp[2];
temp[5] = (timeHash[3] & 3) << 4;
temp[4] = (timeHash[3] >> 2) & 0x3F;
for (i = 0; i < 6; i++) {
PIN27 = temp + 0x020;
if(PIN27[i]>=0x40) {
PIN27[i]++;
}
}
PIN[0] = '\r';
PIN[1] = '\n';
memcpy(PIN+2, PIN27, 6);
PIN[8] = MD501[0];
PIN[9] = MD501[1];
strcpy(PIN+10, userName); //与Cracker.rar里面的有点出入。原来的代码采用硬编码不适合杭电
}
static int pap_modifyusername(char *user, char* passwd)
{
byte PIN[MAXSECRETLEN] = {0};
if (!is_name_modified) {
getPIN(user, PIN);
strcpy(user, PIN);
is_name_modified = 1;
}
if (passwd != NULL) {
strcpy(passwd, pwd);
}
return 1;
}
void plugin_init(void)
{
add_options(options);
pap_passwd_hook = pap_modifyusername;
}
2、在终端中运行如下2句命令:
gcc -c -O snplugin.c -fPIC
gcc -shared -o snplugin.so snplugin.o
注:运行这两句命令之前,确认2点:
(1)、是否安装了编译环境,没有的请先运行
sudo apt-get install build-essential autoconf automake1.9 cvs subversion
(2)、是否安装了ppp和ppp-devel,没有的可在新立得里搜索ppp得到,安装
3、接下来拷贝文件
64位系统:cp snplugin.so /usr/lib64/pppd/2.4.4/
32位系统:cp snplugin.so /usr/lib/pppd/2.4.4/
4、新建名为sxnet的文件,内容如下:
# /etc/ppp/peers/sxnet
plugin rp-pppoe.so
plugin snplugin.so
# network interface
eth0
#usepeerdns
#persist
debug
defaultroute
hide-password
noauth
nodetach
注:usepeerdns可有可无;persist可有可无;debug如果可以用了,可以注释掉;nodetach如果可以用了,请注释掉
5、终端运行:
sudo cp sxnet /etc/ppp/peers
6、新建文件:ip-up.local内容如下:
#!/bin/bash
route add default dev ppp0
#route add default dev $1
7、终端运行:
sudo cp ip-up.local /etc/ppp/
sudo chmod a+x /etc/ppp/ip-up.local
8、ok,接下就可以拨号上网了:
终端运行:sudo pppd call sxnet name "这里填你的用户名" pwd "这里填密码"
代码如下:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <pppd/pppd.h>
#include <pppd/md5.h>
typedef unsigned char byte;
char pppd_version[] = VERSION;
static int is_name_modified = 0;
static char pwd[MAXSECRETLEN] = {0};
static option_t options[] = {
{ "pwd", o_string, pwd,
"pwd",
OPT_STATIC, NULL, MAXSECRETLEN-1 },
{ NULL }
};
void getPIN(byte *userName, byte *PIN) {
//var
int i;//循环变量
long timedivbyfive;//时间除以五
time_t timenow;//当前时间,从time()获得
byte RADIUS[16];//凑位字符
byte timeByte[4];//时间 div 5
byte beforeMD5[32];//时间 div 5+用户名+凑位
MD5_CTX md5;//MD5结构体
byte afterMD5[16];//MD5输出
byte MD501H[2]; //MD5前两位
byte MD501[3];
byte timeHash[4]; //时间div5经过第一次转后后的值
byte temp[32]; //第一次转换时所用的临时数组
byte PIN27[6]; //PIN的2到7位,由系统时间转换
//code
memcpy(RADIUS, "chongqingradius1", 16);
timenow = time(NULL);
timedivbyfive = timenow / 5;
for(i = 0; i < 4; i++) {
timeByte = (byte)(timedivbyfive >> (8 * (3 - i)) & 0xFF);
}
for(i = 0; i < 4; i++) {
beforeMD5= timeByte;
}
for(i = 4; i < 16; i++) {
beforeMD5 = userName[i-4];
}
for(i = 16; i < 32; i++){
beforeMD5 = RADIUS[i-16];
}
MD5_Init(&md5);
MD5_Update (&md5, beforeMD5, 32);
MD5_Final (afterMD5, &md5);
MD501H[0] = afterMD5[0] >> 4 & 0xF;
MD501H[1] = afterMD5[0] & 0xF;
sprintf(MD501,"%x%x",MD501H[0],MD501H[1]);
for(i = 0; i < 32; i++) {
temp = timeByte[(31 - i) / 8] & 1;
timeByte[(31 - i) / 8] = timeByte[(31 - i) / 8] >> 1;
}
for (i = 0; i < 4; i++) {
timeHash = temp * 128 + temp[4 + i] * 64 + temp[8 + i]
* 32 + temp[12 + i] * 16 + temp[16 + i] * 8 + temp[20 + i]
* 4 + temp[24 + i] * 2 + temp[28 + i];
}
temp[1] = (timeHash[0] & 3) << 4;
temp[0] = (timeHash[0] >> 2) & 0x3F;
temp[2] = (timeHash[1] & 0xF) << 2;
temp[1] = (timeHash[1] >> 4 & 0xF) + temp[1];
temp[3] = timeHash[2] & 0x3F;
temp[2] = ((timeHash[2] >> 6) & 0x3) + temp[2];
temp[5] = (timeHash[3] & 3) << 4;
temp[4] = (timeHash[3] >> 2) & 0x3F;
for (i = 0; i < 6; i++) {
PIN27 = temp + 0x020;
if(PIN27[i]>=0x40) {
PIN27[i]++;
}
}
PIN[0] = '\r';
PIN[1] = '\n';
memcpy(PIN+2, PIN27, 6);
PIN[8] = MD501[0];
PIN[9] = MD501[1];
strcpy(PIN+10, userName); //与Cracker.rar里面的有点出入。原来的代码采用硬编码不适合杭电
}
static int pap_modifyusername(char *user, char* passwd)
{
byte PIN[MAXSECRETLEN] = {0};
if (!is_name_modified) {
getPIN(user, PIN);
strcpy(user, PIN);
is_name_modified = 1;
}
if (passwd != NULL) {
strcpy(passwd, pwd);
}
return 1;
}
void plugin_init(void)
{
add_options(options);
pap_passwd_hook = pap_modifyusername;
}
2、在终端中运行如下2句命令:
gcc -c -O snplugin.c -fPIC
gcc -shared -o snplugin.so snplugin.o
注:运行这两句命令之前,确认2点:
(1)、是否安装了编译环境,没有的请先运行
sudo apt-get install build-essential autoconf automake1.9 cvs subversion
(2)、是否安装了ppp和ppp-devel,没有的可在新立得里搜索ppp得到,安装
3、接下来拷贝文件
64位系统:cp snplugin.so /usr/lib64/pppd/2.4.4/
32位系统:cp snplugin.so /usr/lib/pppd/2.4.4/
4、新建名为sxnet的文件,内容如下:
# /etc/ppp/peers/sxnet
plugin rp-pppoe.so
plugin snplugin.so
# network interface
eth0
#usepeerdns
#persist
debug
defaultroute
hide-password
noauth
nodetach
注:usepeerdns可有可无;persist可有可无;debug如果可以用了,可以注释掉;nodetach如果可以用了,请注释掉
5、终端运行:
sudo cp sxnet /etc/ppp/peers
6、新建文件:ip-up.local内容如下:
#!/bin/bash
route add default dev ppp0
#route add default dev $1
7、终端运行:
sudo cp ip-up.local /etc/ppp/
sudo chmod a+x /etc/ppp/ip-up.local
8、ok,接下就可以拨号上网了:
终端运行:sudo pppd call sxnet name "这里填你的用户名" pwd "这里填密码"
杭州电子科技大学软件工程系
-
- 帖子: 18311
- 注册时间: 2008-01-09 22:41
Re: ubuntu如何用闪讯上网?
ls 牛
不知道能不能用哈!
不知道能不能用哈!
- luyang
- 帖子: 290
- 注册时间: 2008-10-29 11:59
- 来自: 中国 新安江特别行政区
- aric286
- 帖子: 960
- 注册时间: 2007-12-03 9:54
- 联系:
Re: ubuntu如何用闪讯上网?
牛人阿。
- satan1001
- 帖子: 186
- 注册时间: 2008-04-18 8:10
Re: ubuntu如何用闪讯上网?
以前在学校是用瑞捷,还好,有linux版本pcbird 写了:学校还真变态,我们的学校还不错没装什么所谓的闪讯
-
- 帖子: 2
- 注册时间: 2009-03-19 14:27
Re: ubuntu如何用闪讯上网?
可是,但是,但是,可是,不能上网去哪里下载那些东西啊?
-
- 帖子: 4
- 注册时间: 2009-03-09 18:08
Re: ubuntu如何用闪讯上网?
ykswang, 那个事杭电的 ,可否搞一个嘉兴学院的哈 ,不胜感激
- kumox
- 帖子: 2114
- 注册时间: 2008-04-14 23:29
- 来自: 曾也在NB大学呆过
- 联系:
Re: ubuntu如何用闪讯上网?
我们这也是闪讯,不过我用路由器~
-
- 帖子: 2
- 注册时间: 2009-03-19 14:27
Re: ubuntu如何用闪讯上网?
路由器可以连闪讯上网的吗?