LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: sucessing

请教版主,关于BBIagent问题

[复制链接]
发表于 2003-12-27 21:47:16 | 显示全部楼层
有人懂elf文件格式吗?我把bbiagent解开来有三个elf文件:init,iptable,ifconfig
[root@ www]# cat libs.js
function launch(pg) {
        var w = 630, h = 450;
  var popW = w, popH = h;
        if (document.all || document.layers) {
    w = screen.availWidth;
    h = screen.availHeight;
        }
        var page = pg + ".htm";
  var leftPos = (w-popW)/2, topPos = (h-popH)/2;
  if(document.all) {
                var wOpt="status=0,scrollbars=0,resizable=0,width="+popW+",height="+popH+",left="+leftPos+",top="+topPos;
                window.open(page,"BBIagentRouter",wOpt);
  } else {
                var wOpt="status=0,scrollbars=0,resizable=0,width="+popW+",height="+popH+",screenX="+leftPos+",screenY="+topPos;
                window.open(page,"BBIagentRouter",wOpt);
  }
}

function showHint(mode) {
        switch (mode) {
                case 0: status=applet; break;
                case 1: status=plugin; break;
                case 2: status=jnlp; break;
                default: status='';
        }
        return true;
}

function isValidFile(fm, msg) {
        if (fm.jarfile.value=="") {
                alert(msg);
                return false;
        }
        return true;
}

[root@ en]# cat index.htm
<html>
<head>
<title>BBIagent Broadband Router</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="EXPIRES" content="Tue, 01 Jan 2002 01:00:00 GMT">
<meta http-equiv="ragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="Copyright" content="Copyright (c) 2000-2002 BBIagent.NET All Rights Reserved by HKSP.COM">
<meta name="Description" content="BBIagent Broadband Router">
<style type="text/css">
<!--
a            { color: #000000; font-weight: normal; text-decoration: none }
a:visited    { color: #000000; font-weight: normal; text-decoration: none }
A:active
{
    COLOR: #FF0000;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A:hover
{
    COLOR: #FF0000}
body{ background-color: #FFFFFF ; font-size: 12px; font-family: "Times New Roman", "Times", "serif"}
-->
</style>
<script language="JavaScript" src="libs.js"></script>
<script language="JavaScript">
var applet='Start BBIagent Explorer as Java Applet';
var plugin='Start BBIagent Explorer as Java Plug-in';
var jnlp='Start BBIagent Explorer with Java Network Launching Protocol';
</script>
</head>
<body bgcolor="#ffffff">
<table width="343" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td height="40" valign="top" width="343">&nbsp;</td>
  </tr>
  <tr>
    <td></td>
  </tr>
  <tr>
    <td valign="top"><img src="images/index.gif" width="343" height="202" align="middle" onClick="location='http://www.BBIagent.Net';return true;"></td>
  </tr>
  <tr>
    <td valign="middle" class="subject" align="center">
      <p><br>
        Click one of following links to launch<br>
                                <br>
        <font color="#FF0000"><b>BBIagent Explorer</b></font><br>
        <br><br>
      </p>
    </td>
  </tr>
  <tr>
    <td valign="top">
      <table border="0" cellpadding="0" cellspacing="0" width="343">
        <tr>
          <td width="33"></td>
          <td width="80"></td>
          <td width="18"></td>
          <td width="80"></td>
          <td width="18"></td>
          <td width="80"></td>
          <td width="34"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td valign="middle" align="center"><a href="javascript:launch('applet')" onMouseOut="showHint(-1);" onMouseOver="showHint(0);return true;"><b>Applet</b></a></td>
          <td>&nbsp;</td>
          <td valign="middle" align="center"><a href="javascript:launch('plugin')" onMouseOut="showHint(-1);" onMouseOver="showHint(1);return true;"><b>lug-in</b></a></td>
          <td>&nbsp;</td>
                                        <td valign="middle" align="center"><a href="BBIagent.jnlp" onMouseOut="showHint(-1);" onMouseOver="showHint(2);return true;"><b>JNLP</b></a></td>
          <td valign="top">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" align="center">
                 Copyright &copy; 2000-2002 <a href="http://www.BBIagent.Net">BBIagent.Net</a>
                 <br>
     <img src="images/ruler.gif" width="240" height="3"><br>
     Powered by <a href="http://www.hksp.com" target="_blank">HKSP.COM</a>
  </tr>
</table>
</body>
</html>

[root@ en]# cat up.htm
<html>
<head>
<title>BBIagent Broadband Router</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="EXPIRES" content="Tue, 01 Jan 2002 01:00:00 GMT">
<meta http-equiv="ragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="Copyright" content="Copyright (c) 2000-2002 BBIagent.NET All Rights Reserved by HKSP.COM">
<meta name="Description" content="BBIagent Broadband Router">
<style type="text/css">
<!--
a            { color: #000000; font-weight: normal; text-decoration: none }
a:visited    { color: #000000; font-weight: normal; text-decoration: none }
A:active
{
    COLOR: #FF0000;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A:hover
{
    COLOR: #FF0000}
body{ background-color: #FFFFFF ; font-size: 12px; font-family: "Times New Roman", "Times", "serif"}
-->
</style>
<!--<link rel="stylesheet" href="style.css" type="text/css">-->
<script language="JavaScript" src="ip.js"></script>
<script language="JavaScript" src="libs.js"></script>
</head>

<body bgcolor="#ffffff">
<table width="343" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td height="40" valign="top" width="343">&nbsp;</td>
  </tr>
  <tr>
    <td></td>
  </tr>
  <tr>
    <td valign="top"><img src="images/index.gif" width="343" height="202" align="middle"></td>
  </tr>
  <tr>
    <td valign="middle" class="subject" align="center">
      <p><br>
                                To start <font color="#CC0000"><b>BBIagent Explorer</b></font>, execute
                                <br><b>java -jar BBIagent.jar -r
        <script language="JavaScript">document.write(ip);</script>
                                </b><br>
      </p>
      <form name="upload" enctype="multipart/form-data" method="post" action="/" onSubmit="status='Uploading BBIagent Explorer ...';return true;">
                                Or input the path of <b>BBIagent.jar</b> in the hard disk
                                <br><input type="file" name="jarfile"><br>
                                and <input type="submit" value="upload" onClick="return isValidFile(upload,'Please input the path of BBIagent.jar in your harddisk.');"> to the router.
                                <br>
      </form>
    </td>
  </tr>
  <tr>
    <td></td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" align="center">
                 Copyright &copy; 2000-2002 <a href="http://www.BBIagent.Net">BBIagent.Net</a>
                 <br><img src="images/ruler.gif" width="240" height="3"><br>
                 Powered by <a href="http://www.hksp.com" target="_blank">HKSP.COM</a>
                </td>
  </tr>
</table>
</body>
</html>

好像没有其他的了
[root@ bbi]# ls -F
dev/  etc/  lib/  sbin/
[root@ bbi]# cd  sbin
[root@ sbin]# ls
ifconfig  init  iptables
[root@ bbi]# cd etc
[root@ etc]# ls
services  www/
[root@ etc]# cd  www
[root@ www]# ls
BBIagent.jnlp  en/  favicon.ico  images/  libs.js  zh-cn/  zh-hk/  zh-tw/
[root@ bbi]# cd lib
[root@ lib]# ls -F
iptables/             libdl-0.9.19.so   libpthread-0.9.19.so  libutil.so.0@
ld-uClibc-0.9.19.so*  libdl.so.0@       libpthread.so.0@      modules/
ld-uClibc.so.0@       libm-0.9.19.so    libresolv-0.9.19.so   uclibc@
libcrypt-0.9.19.so    libm.so.0@        libresolv.so.0@
libcrypt.so.0@        libnsl-0.9.19.so  libuClibc-0.9.19.so
libc.so.0@            libnsl.so.0@      libutil-0.9.19.so
[root@ dev]# ls -F
console  loop0  ppp   ram0    tty0  tty4     ttyACM2  ttyS0  urandom
fd0      loop1  ptmx  ram1    tty1  tty5     ttyACM3  ttyS1  zero
initrd   mem    pts/  systty  tty2  ttyACM0  ttyp0    ttyS2
log|     null   ram   tty     tty3  ttyACM1  ttyp1    ttyS3
发表于 2003-12-27 22:23:45 | 显示全部楼层
init文件原型如下,不知道他们改了什么地方
#!/bin/sh

mount -n -o remount,rw /
mount /proc
cp /proc/mounts /etc/mtab

echo
echo
echo "Manually configing your host system ......"
echo

echo "Configing your mouse type ......"
echo -n "Do you have a PS/2 mouse? "
read response

if [ "$response" = "y" ]
then
    echo "Setting up your PS/2 mouse ......"
    ln -s /dev/psaux /dev/mouse >& /dev/null
    gpm -t ps2 >& /dev/null
else
    echo "Setting up your Mouse System mouse on COM1 ......"
    ln -s /dev/cua0 /dev/mouse >& /dev/null
    gpm -t msc >& /dev/null
fi

echo
echo "Configing your network ......"

echo -n "Your network card type [i.e. 3c509/3c59x]: "
read NIC
insmod /lib/modules/net/${NIC}.o

echo -n "NIC IP address [Default 128.250.18.45]: "
read IPADDRESS
if [ "$IPADDRESS" = "" ]
then
    IPADDRESS=128.250.18.45
fi

echo -n "NIC subnet mask [Default 255.255.255.0]: "
read NETMASK
if [ "$NETMASK" = "" ]
then
    NETMASK=255.255.255.0
fi

echo -n "NIC Network address [Default 128.250.18.0]: "
read NETWORK
if [ "$NETWORK" = "" ]
then
    NETWORK=128.250.18.0
fi

echo -n "NIC Gateway address [Default 128.250.18.1]: "
read GATEWAY
if [ "$GATEWAY" = "" ]
then
    GATEWAY=128.250.18.1
fi

echo -n "DNS server address [Default 128.250.20.2]: "
read DNS
if [ "$DNS" = "" ]
then
    DNS=128.250.20.2
fi

echo -n "Second DNS server address [Default 128.250.1.21]: "
read SecondDNS
if [ "$SecondDNS" = "" ]
then
    SecondDNS=128.250.1.21
fi

# read BROADCAST
# echo -n "NIC Broadcast address [i.e. 128.250.18.255]: "

echo -n "Your host name [Default concerto]: "
read HOSTNAME
if [ "$HOSTNAME" = "" ]
then
    HOSTNAME=concerto
fi
hostname $HOSTNAME

echo -n "Domain name [Default its.unimelb.edu.au]: "
read DOMAINNAME
if [ "$DOMAINNAME" = "" ]
then
    DOMAINNAME=its.unimelb.edu.au
fi

echo
echo "Save this configuration ......"

echo "Create /etc/hosts ......"
echo "127.0.0.1 localhost"
echo "127.0.0.1 localhost" > /etc/hosts
echo "$IPADDRESS $HOSTNAME.$DOMAINNAME"
echo "$IPADDRESS $HOSTNAME.$DOMAINNAME" >> /etc/hosts

echo "Create /etc/resolv.conf ......"
echo "search $DOMAINNAME"
echo "search $DOMAINNAME" > /etc/resolv.conf
echo "nameserver $DNS"
echo "nameserver $DNS" >> /etc/resolv.conf
echo "nameserver $SecondDNS"
echo "nameserver $SecondDNS" >> /etc/resolv.conf

echo
echo "Networking is up ......"

echo "ifconfig lo 127.0.0.1"
ifconfig lo 127.0.0.1

echo "ifconfig eth0 $IPADDRESS netmask $NETMASK"
ifconfig eth0 ${IPADDRESS} netmask ${NETMASK}

# ifconfig eth0 ${IPADDRESS} netmask ${SUBNET} broadcast ${BROADCAST}

echo "route add -net 127.0.0.0 lo"
route add -net 127.0.0.0 lo

echo "route add -net $NETWORK netmask $NETMASK eth0"
route add -net ${NETWORK} netmask ${NETMASK} eth0

echo "route add default gw $GATEWAY eth0"
route add default gw ${GATEWAY} eth0

echo "Loading NFS module ......"
insmod /lib/modules/fs/nfs.o

SH=/bin/bash

open -c 2 -- $SH -rcfile /etc/bashrc
open -c 3 -- $SH -rcfile /etc/bashrc
open -c 4 -- $SH -rcfile /etc/bashrc
open -c 5 -- $SH -rcfile /etc/bashrc
open -c 6 -- $SH -rcfile /etc/bashrc

echo
echo
echo
echo "Welcome to Mini-Linux (Kangaroo)"
echo

exec $SH -rcfile /etc/bashrc
发表于 2003-12-28 18:13:37 | 显示全部楼层
为什么不用 smoothwall 呢 ?

smoothwall 比 BBI好多了~~~又不用软盘启动~~

直接到网上下来安装了就ok了~~!

我以前也用BBI 的 现在改用smoothwall 了~~

你用 1.0  的就可以了 特别稳定 光纤和adsl都没问题~!

你试试~!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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