当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 8 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [问题]ubuntu7.10下make的问题,求救!
帖子发表于 : 2007-10-19 19:22 
头像

注册: 2007-06-10 8:28
帖子: 29
送出感谢: 0 次
接收感谢: 0 次
今天下完ubuntu7.10之后,因为学校需要dr.com(v3.39)在win下登陆上网,于是按照论坛里的帖子,下了drcom-1.3.7.tar.gz,编译的时候出些下面的代码,请高手们多多指教!
root@blackstar:/tmp/drcom-1.3.7# make
make -C drcomc
make[1]: Entering directory `/tmp/drcom-1.3.7/drcomc'
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o drcomc.o drcomc.c
gcc drcomc.o -o drcomc
make[1]: Leaving directory `/tmp/drcom-1.3.7/drcomc'
make -C drcomd
make[1]: Entering directory `/tmp/drcom-1.3.7/drcomd'
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o drcomd.o drcomd.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o daemon.o daemon.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o cleanup.o cleanup.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o dialog.o dialog.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o handle.o handle.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o init.o init.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o keepalive.o keepalive.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o login.o login.c
login.c: In function ‘drcom_login’:
login.c:50: warning: unused parameter ‘timeout’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o logout.o logout.c
logout.c: In function ‘drcom_logout’:
logout.c:34: warning: unused parameter ‘timeout’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o md5.o md5.c
md5.c:131:36: warning: use of C99 long long integer constant
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o misc.o misc.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o passwd.o passwd.c
passwd.c: In function ‘drcom_passwd’:
passwd.c:32: warning: unused parameter ‘timeout’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o readconf.o readconf.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o watchport.o watchport.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o getaddr.o getaddr.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/tmp/drcom-1.3.7/include -O2 -c -o log.o log.c
log.c: In function ‘dbg’:
log.c:34: warning: unused parameter ‘format’
gcc -lm -lpthread drcomd.o daemon.o cleanup.o dialog.o handle.o init.o keepalive.o login.o logout.o md5.o misc.o passwd.o readconf.o watchport.o getaddr.o log.o -o drcomd
make[1]: Leaving directory `/tmp/drcom-1.3.7/drcomd'
make -C kmod
make[1]: Entering directory `/tmp/drcom-1.3.7/kmod'
make -C /lib/modules/2.6.22-14-generic/build M=/tmp/drcom-1.3.7/kmod modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.22-14-generic'
CC [M] /tmp/drcom-1.3.7/kmod/init.o
CC [M] /tmp/drcom-1.3.7/kmod/proc.o
CC [M] /tmp/drcom-1.3.7/kmod/proto.o
/tmp/drcom-1.3.7/kmod/proto.c: In function ‘init_hijack’:
/tmp/drcom-1.3.7/kmod/proto.c:453: warning: assignment from incompatible pointer type
/tmp/drcom-1.3.7/kmod/proto.c:454: warning: assignment from incompatible pointer type
/tmp/drcom-1.3.7/kmod/proto.c: In function ‘cleanup_hijack’:
/tmp/drcom-1.3.7/kmod/proto.c:461: warning: comparison of distinct pointer types lacks a cast
/tmp/drcom-1.3.7/kmod/proto.c:462: warning: assignment from incompatible pointer type
LD [M] /tmp/drcom-1.3.7/kmod/drcom.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/drcom-1.3.7/kmod/drcom.mod.o
LD [M] /tmp/drcom-1.3.7/kmod/drcom.ko
make[2]: Leaving directory `/usr/src/linux-headers-2.6.22-14-generic'
make[1]: Leaving directory `/tmp/drcom-1.3.7/kmod'

我的内核信息:
root@blackstar:~# uname -r
2.6.22-14-generic

root@blackstar:~# ls /usr/src
linux-headers-2.6.22-14 linux-headers-2.6.22-14-generic

gcc的版本:
root@blackstar:~# cat /proc/version
Linux version 2.6.22-14-generic (buildd@palmer) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Sun Oct 14 23:05:12 GMT 2007

请各位高手们指点,被dr.com折磨很长时间了,痛苦啊......


最后由 bslt 编辑于 2007-10-20 16:43,总共编辑了 2 次

页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2007-10-19 21:04 

注册: 2006-03-02 22:34
帖子: 279
地址: 广西南宁
送出感谢: 0 次
接收感谢: 0 次
我的在704下面可以
现在710不行了,郁闷


_________________
Ubuntu8.04
IBM T40 PM 1.5G
1.5G内存
80G硬盘
14.1XGA
显卡 ATI RADEON 7500 32M
56K/1GB/红外/TV-out/无线802.11b
COMBO


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2007-10-19 21:10 

注册: 2007-10-08 16:45
帖子: 82
送出感谢: 0 次
接收感谢: 0 次
貌似很难的样子啊。。嘿嘿。多多努力吧。。 :P 偶看不懂呵。。


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2007-10-20 16:21 
头像

注册: 2007-06-10 8:28
帖子: 29
送出感谢: 0 次
接收感谢: 0 次
:(
各位高手,麻烦你们给看看!


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2007-10-20 16:30 

注册: 2007-01-19 15:13
帖子: 33
送出感谢: 0 次
接收感谢: 0 次
装下md5sum吧

error: openssl/md5.h: No such file or directory


页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2007-10-20 16:32 
头像

注册: 2007-06-10 8:28
帖子: 29
送出感谢: 0 次
接收感谢: 0 次
这是drcom-1.3.7的login.c代码:
/*
libdrcom - Library for communicating with DrCOM 2133 Broadband Access Server
Copyright (C) 2005 William Poetra Yoga Hadisoeseno <williampoetra@yahoo.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <stdio.h>
#include <string.h>

#include "md5.h"

#include "log.h"

#include "private.h"

void _build_login_packet(struct drcom_login_packet *, struct drcom_info *, struct drcom_host *, struct drcom_challenge *);
void _build_authentication(struct drcom_auth *, struct drcom_acknowledgement *);
void _build_keepalive(struct drcom_host_msg *, struct drcom_login_packet *, struct drcom_acknowledgement *);
/*
static void mylog_message(int priority, const char *format, va_list args)
{
vfprintf(stderr, format, args);
}

void myloginfo(const char *format, ...)
{
va_list args;
va_start(args, format);
mylog_message(LOG_INFO, format, args);
va_end(args);
}
*/
/* drcom_login
Logs in.
*/

int drcom_login(struct drcom_handle *h, int timeout)
{
struct drcom_socks *socks = (struct drcom_socks *) h->socks;
struct drcom_info *info = (struct drcom_info *) h->info;
struct drcom_host *host = (struct drcom_host *) h->host;
struct drcom_host_msg *response = (struct drcom_host_msg *) h->response;
struct drcom_host_msg *keepalive = (struct drcom_host_msg *) h->keepalive;
struct drcom_auth *auth = (struct drcom_auth *) h->auth;
struct drcom_challenge challenge;
struct drcom_login_packet login_packet;
struct drcom_acknowledgement acknowledgement;
int retry=0;

try_it_again_1:
retry++;
if(retry>3)
return -1;
if(_send_dialog_packet(socks, NULL, PKT_REQUEST)<0){
logerr("_send_dialog_packet(PKT_REQUEST) failed\n");
return -1;
}

if(_recv_dialog_packet(socks, &challenge, PKT_CHALLENGE)<0){
logerr("_recv_dialog_packet(PKT_CHALLENGE) failed\n");
goto try_it_again_1;
}

/* Now the _real_ ip address of the server is known */
info->servip = socks->servaddr_in.sin_addr.s_addr;

_build_login_packet(&login_packet, info, host, &challenge);

retry=0;
try_it_again_2:
retry++;
if(retry>3)
return -1;
if(_send_dialog_packet(socks, &login_packet, PKT_LOGIN)<0){
logerr("_send_dialog_packet(PKT_LOGIN) failed\n");
return -1;
}

if(_recv_dialog_packet(socks, &acknowledgement, PKT_ACK_SUCCESS)<0){
logerr("_recv_dialog_packet(PKT_ACK_SUCCESS) failed\n");
goto try_it_again_2;
}

if (acknowledgement.serv_header.pkt_type == PKT_ACK_SUCCESS)
{
_build_authentication(auth, &acknowledgement);
_build_keepalive(keepalive, &login_packet, &acknowledgement);
memcpy(response, keepalive, sizeof(*keepalive));
loginfo("You have used %u Minutes, and %uK bytes\n",
acknowledgement.time_usage, acknowledgement.vol_usage);
return 0;
}
else
return -1;
}

void _build_login_packet(struct drcom_login_packet *login_packet,
struct drcom_info *info, struct drcom_host *host,
struct drcom_challenge *challenge)
{
char s[25];
unsigned char t[22], d[16];
int i, passwd_len;

/* header */
login_packet->host_header.pkt_type = PKT_LOGIN;
login_packet->host_header.zero = 0;
login_packet->host_header.len = strlen(info->username) +
sizeof(struct drcom_host_header);
memset(t, 0, 22);
memcpy(t, &login_packet->host_header.pkt_type, 2);
memcpy(t + 2, &challenge->challenge, 4);
passwd_len = strlen(info->password);
strncpy((char *) (t + 6), info->password, 16);
MD5((unsigned char *) t, passwd_len + 6, d);
memcpy(login_packet->host_header.checksum, d, 16);

/* username */
memset(login_packet->username, 0, 36);
strncpy(login_packet->username, info->username, 36);

/* unknown, maybe just a signature? */
login_packet->unknown0 = 0x18;

/* mac */
login_packet->mac_code = 1;
memcpy(login_packet->mac_xor, info->mac, 6);
for (i = 0; i < 6; ++i)
login_packet->mac_xor ^= login_packet->host_header.checksum;

/* ok, first checksum */
/* l already calculated */
/* l = strlen(info->password); */
s[0] = 0x01;
memcpy(s + 1, info->password, passwd_len);
memcpy(s + 1 + passwd_len, &challenge->challenge, 4);
memset(s + 1 + passwd_len + 4, 0, 4);
MD5((unsigned char *) s, 1 + passwd_len + 4 + 4, d);
memcpy(login_packet->checksum1, d, 16);

/* nic */
login_packet->num_nic = 1;
memcpy(login_packet->nic, info->nic, 16);

/* second checksum */
login_packet->checksum2_half[0] = 0x14;
login_packet->checksum2_half[1] = 0x00;
login_packet->checksum2_half[2] = 0x07;
login_packet->checksum2_half[3] = 0x0b;
MD5((unsigned char *) login_packet, 0x65, d);
memcpy(login_packet->checksum2_half, d, 8);

/* we've got a dog */
login_packet->dog = 1;

/* host info */
memset(login_packet->zero1, 0, 4);
memcpy(&login_packet->host_info, host, sizeof(struct drcom_host));
memset(login_packet->zero2, 0, 96);

/* wtf? */
login_packet->unknown1 = 0x01;
login_packet->unknown2 = 0x00;
login_packet->unknown3[0] = 0x01;
login_packet->unknown3[1] = 0x08;

/* maybe we should use something random instead? */
/*
memset(login_packet->unknown4, 0, 8);
*/
login_packet->unknown4[0] = 0x00;
login_packet->unknown4[1] = 0xf0;
login_packet->unknown4[2] = 0x66;
login_packet->unknown4[3] = 0x33;
login_packet->unknown4[4] = 0x72;
login_packet->unknown4[5] = 0x5b;
login_packet->unknown4[6] = 0xc4;
login_packet->unknown4[7] = 0x01;
/*
memcpy(login_packet->unknown4, d + 8, 8);
*/

return;
}

void _build_authentication(struct drcom_auth *auth, struct drcom_acknowledgement *acknowledgement)
{
memcpy(auth, &acknowledgement->auth_info, sizeof(struct drcom_auth));
return;
}

void _build_keepalive(struct drcom_host_msg *keepalive, struct drcom_login_packet *login_packet, struct drcom_acknowledgement *acknowledgement)
{
keepalive->msgtype = 0xff;
memset(keepalive->msg, 0, 19);
memcpy(keepalive->msg, login_packet->host_header.checksum, 16);
memcpy(&keepalive->auth_info, &acknowledgement->auth_info, sizeof(struct drcom_auth));
return;
}


页首
 用户资料  
 
7 楼 
 文章标题 :
帖子发表于 : 2007-10-20 16:36 

注册: 2007-01-19 15:13
帖子: 33
送出感谢: 0 次
接收感谢: 0 次
那有没包含md5sum.h呢,这个好像编译时候需要的


页首
 用户资料  
 
8 楼 
 文章标题 :
帖子发表于 : 2007-10-20 20:25 
头像

注册: 2007-06-10 8:28
帖子: 29
送出感谢: 0 次
接收感谢: 0 次
各位有没有用drcom在ubuntu7.10下上网的,麻烦告诉我你们安装drcom-1.3.*.tar.gz时,都安装了什么包吗?编译make drcom-1.3.*时是否也出现了上面的代码?谢谢!!!


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 8 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 4 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译