找回密码
 注册

QQ登录

只需一步,快速开始

查看: 40364|回复: 65

折腾一夜,终于在早晨成功在hg522-c上搞顶脱机bt和电驴

[复制链接]
发表于 2010-3-19 08:10:58 | 显示全部楼层 |阅读模式
(deyi:

上图

半个月钱花100块买的猫,在chinadsl上潜水了半个月,学到不少东西
(daxiao:

简单过程分享一下,大家别见笑
1.破解猫(大家都会)
2.提取配置文件到usb设备(大家都会)
3.配置文件解密,参考的论坛一个兄弟的算法,我是用的c#写的一个小程序,原理很简单

4.修改配置文件把telnet和ftp enable="1"
5.加密保存为配置文件
6.usb恢复
7.参考https://www.chinadsl.net/viewthre ... amp;authorid=166775这个贴子
因为h608b和hg522-c硬件基本一样,哈哈
7.telnet >>  atp>>  start >> cd /mnt/usb.......
8.  ./startml
9.成功
10.十全十美

写的比较笼统,有些cfg可以根据个人使用习惯

困死了,写的简单,乱七八糟,回头再来详细写,睡觉了88

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| 发表于 2010-3-19 08:16:23 | 显示全部楼层
(daxiao:
这个猫还是蛮强大的,就是个基于arm cpu的linux,唯一可惜的就是内存太小
不知道哪为大大能不能加内存(wen:
睡啦,88,我爱chinadsl
发表于 2010-3-19 09:03:55 | 显示全部楼层
呵呵,楼主牛啊,希望能放出mldonkey的完整下载包,我用6358的db120来试试看
发表于 2010-3-19 11:30:34 | 显示全部楼层
能否完善提供下 配置文件解密 的那个软件。。或相关链接?

另外个人还是喜欢BCM架构的,目前刷OPENWRT 当无线路由还是很强大的
发表于 2010-3-19 13:07:03 | 显示全部楼层
很强大。希望更详细的过程。
发表于 2010-3-20 23:26:17 | 显示全部楼层
本帖最后由 lovex 于 2010-3-20 23:28 编辑

我希望他能安装Samba 当无线硬盘使,但是没有看到相应的教程!!
  而且还希望能够识别NTFS文件系统,
我主要是不知道HG522-C的系统是什么系统,简介版的Linux吗?还是BusyBox ?
 楼主| 发表于 2010-3-21 08:48:53 | 显示全部楼层
回复 4# tiansha200

加密解密很简单
加密: 字符串里的每个char的ascii码乘2后如果不大于127,那么就保存为该数值的char,如果大于127那么就乘2后减去127保存
解密: 对加密字符串里的每个char循环判断,如果能整除2,那么就直接除2,如果不能,那么就加上127后再除2
 楼主| 发表于 2010-3-21 08:49:53 | 显示全部楼层
我希望他能安装Samba 当无线硬盘使,但是没有看到相应的教程!!
  而且还希望能够识别NTFS文件系统,
我 ...
lovex 发表于 2010-3-20 23:26



    1. 是busybox
    2. samba方案请参考http://www.linuxany.com/archives/1201.html
 楼主| 发表于 2010-3-21 08:50:53 | 显示全部楼层
回复 6# lovex

2010-02-15ARM
ARM embed nmbd samba smbd smbpasswd
23
[原创]移植常用软件到ARM平台之samba2

1.平台环境:
ARM1026EJ-Sid(wb)B rev 2 (v5l)

2.移植软件:
samba2(下载:samba2.2.12)

3.移植目标:
能在目标平台上正常以后台进程方式运行
能正常输出日志,便于查错(日常运行时关闭)
能提供基于用户的认证功能

4.移植说明:
因samba3较大,相对samba2也只是提供了对域控的支持,一般情况下用不到,所以选择了samba2的最后一个版本。
最终生成的配置文件位置由./configure –prefix=/xx/xx决定,需特别注意,否则将导致进程无法加载。
另外如用windows访问共享时出现无权访问的问题,请注销或重启再访问即可解决问题。

具体移植步骤:

1.解压源码
2.进入源码目录:

   1. cd samba-2.2.12/source

3.修改源码:
(1)在include/config.h文件里最后面增加:

   1. #define USE_SETEUID 1

(2)修改lib/util_unistr.c第739、762行为:

   1. return True;

(3)在passdb/pdb_tdb.c第44行开始添加如下代码:

   1. #define PWD_BUFFER_SIZE 256
   2. char bb_path_passwd_file[]="/etc/passwd" ;
   3. struct passwd *__getpwent(int pwd_fd)
   4. {
   5.        static char line_buff[PWD_BUFFER_SIZE];
   6.        static struct passwd passwd;
   7.        char *field_begin;
   8.         char *endptr;
   9.         char *gid_ptr=NULL;
  10.         char *uid_ptr=NULL;
  11.         int line_len;
  12.         int i;
  13.  
  14.         restart:
  15.         if ((line_len = read(pwd_fd, line_buff, PWD_BUFFER_SIZE)) <= 0)
  16.                 return NULL;
  17.         field_begin = strchr(line_buff, '\n');
  18.         if (field_begin != NULL)
  19.                 lseek(pwd_fd, (long) (1 + field_begin - (line_buff + line_len)),SEEK_CUR);
  20.         else
  21.            {                                             
  22.                 do
  23.                 {
  24.                        if ((line_len = read(pwd_fd, line_buff, PWD_BUFFER_SIZE)) <= 0)
  25.                                        return NULL;
  26.                 } while (!(field_begin = strchr(line_buff, '\n')));
  27.                 lseek(pwd_fd, (long) (field_begin - line_buff) - line_len + 1,SEEK_CUR);
  28.                 goto restart;
  29.         }
  30.         if (*line_buff == '#' || *line_buff == ' ' || *line_buff == '\n' ||*line_buff =='\t')
  31.                 goto restart;
  32.         *field_begin = '\0';
  33.         field_begin = line_buff;
  34.         for (i = 0; i < 7; i++)
  35.         {
  36.                  switch (i)
  37.                  {
  38.                        case 0:
  39.                                passwd.pw_name = field_begin;
  40.                                break;
  41.                       case 1:
  42.                                passwd.pw_passwd = field_begin;
  43.                                break;
  44.                       case 2:
  45.                                uid_ptr = field_begin;
  46.                                break;
  47.                       case 3:
  48.                                gid_ptr = field_begin;
  49.                                break;
  50.                       case 4:
  51.                       passwd.pw_gecos = field_begin;
  52.                                break;
  53.                       case 5:
  54.                                passwd.pw_dir = field_begin;
  55.                                break;
  56.                       case 6:
  57.                                passwd.pw_shell = field_begin;
  58.                                break;
  59.                }
  60.                if (i < 6)
  61.                    {
  62.                       field_begin = strchr(field_begin, ':');
  63.                       *field_begin++ = '\0';
  64.                }
  65.       }
  66.       passwd.pw_gid = (gid_t) strtoul(gid_ptr, &endptr, 10);
  67.       if (*endptr != '\0')
  68.                passwd.pw_uid = (uid_t) strtoul(uid_ptr, &endptr, 10);
  69.       if (*endptr != '\0')
  70.                goto restart;
  71.       return &passwd;
  72. }
  73. struct passwd *getpwnam(const char *name)
  74. {
  75.       int passwd_fd;
  76.       struct passwd *passwd;
  77.       if (name == NULL)
  78.       {
  79.                errno = EINVAL;
  80.                return NULL;
  81.       }
  82.       if ((passwd_fd = open(bb_path_passwd_file, O_RDONLY)) < 0)
  83.                return NULL;
  84.       while ((passwd = __getpwent(passwd_fd)) != NULL)
  85.                if (!strcmp(passwd->pw_name, name))
  86.                {
  87.                        close(passwd_fd);
  88.                        return passwd;
  89.                }
  90.       close(passwd_fd);
  91.       return NULL;
  92. }
  93. struct passwd *getpwuid(uid_t uid)
  94. {
  95.       int passwd_fd;
  96.          struct passwd *passwd;
  97.          if ((passwd_fd = open("/etc/passwd", O_RDONLY)) < 0)
  98.                  return NULL;
  99.          while ((passwd = __getpwent(passwd_fd)) != NULL)
100.                  if (passwd->pw_uid == uid) {
101.                           close(passwd_fd);
102.                           return passwd;
103.                   }
104.          close(passwd_fd);
105.          return NULL;
106. }
107. int setgroups(size_t size, const gid_t * list)
108. {
109.          return 0;
110. }

4.编译源码
(1)设置环境变量:

   1. export CC=arm-linux-gcc-4.2.4
   2. export LDFLAGS='-L/usr/local/arm-linux/lib'
   3. export CFLAGS='-O3 -s -static -I/usr/local/arm-linux/include'

(2)编译

   1. ./configure --prefix=/mnt/usb1_1/samba/ --host=arm-linux
   2. make
   3. make install

5.软件移植
(1)复制下列文件及目录

   1. /mnt/usb1_1/samba
   2. /mnt/usb1_1/samba/bin
   3. /mnt/usb1_1/samba/var
   4. /mnt/usb1_1/samba/private
   5. /mnt/usb1_1/samba/lib

(2)使用方法
I.添加用户名及设置密码

   1. adduser linuxany
   2. bin/smbpasswd -a linuxany
   3. bin/smbpasswd linuxany linuxany.com
   4. (说明:linuxany为用户名,linuxany.com为密码)

II.启动samba服务

   1. sbin/nmbd -D
   2. sbin/smbd -D
发表于 2010-3-21 12:36:37 | 显示全部楼层
这猫性能太烂了。。
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|宽带技术网 |网站地图

粤公网安备 44152102000001号

GMT+8, 2024-4-29 06:50 , Processed in 0.028905 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表