HTC G1 获得Root权限
Dec 31st, 2008 by song

今天折腾了半天就官方屏蔽了软件库里的这个软件 后来在一国外站找到


如果是自制美RC30和英RC8,操作如下
1、安装一个terminal emulator;
2、运行后先执行su,取得root权限;
3、cd/system/bin,执行telnetd &,一定要&,放在后台运行

在G1的telnet终端或通过wifi后用电脑telenet上登录即可。

后面就可以做你想做的事情了

附件是必须品呵呵

[file]attachment/1230730584_0.rar[/file]

HTC g1 一些常见问题啊
Dec 31st, 2008 by song

以下问答是从论坛中整理出来的,目前还不完整,今后会不断更新和修正的。感谢论坛中所有热心回答问题的朋友们。如有遗漏或错误,请站短我,我会添加和修正的。

按Ctrl+F在对话框中输入问题的关键字,可以快速搜索问题。

G1买回来一定要解锁么?

答:是的,G1是和T-Mobile绑定的,不解锁就不能使用国内的电话卡,经销商已经帮你做过的除外。

我没有Gmail邮箱能使用G1么?

答:不能,G1必须捆绑一个Gmail账号。

我想更改Gmail账号,该怎么做?

答:进入菜单settings-applications-manage applications,找到Google Apps后clear data后,就会看到一个提示,提示你需要重新设置gmail,输入新的gmail帐号即可。

我想把菜单里的图标放到桌面上怎么做?

答:按住图标不动,手机震动一下后会自动切换到桌面,松手后图标就放到桌面上了。

我想删除桌面的图标怎么做?

答:按住图标不动,手机震动一下后菜单栏会变成垃圾桶图标,把想删除的图标拖过去就能删除。

能用蓝牙听立体声或者传输文件么?

答:目前不能,仅支持蓝牙耳机。

任务列表里的程序能自己关闭么?

答:目前不能,只能通过关机的方法释放程序。

不插手机卡能拨紧急电话么?

答:在中国不能,110、119、120、122被认为是无效的号码。

G1能直接输入中文么?

答:暂时不能,只能通过aPowerSMS或A4等软件用复制粘贴的形式输入中文。

如何查看我手机的版本?

答:Setting–>About Phone就能看到了。

5、我错升级到RC30了,能降级么?

答:不能,只能等待RC30破解。

6、G1能够支持多大的TF卡?

答:理论上可以支持到16G,目前测试过的仅有8G SDHC,Class 6/4/2都支持。

为什么我的G1电量消耗的特别快?

答:关闭GPS和WIFI,仅在使用的时候打开。

我想给G1里装些软件该怎么装?

答:可以用G1上网进入Market在线安装,或者从论坛下载安装包到本地,通过电脑装到手机上。

我的手机连在电脑上怎么认不出来?

这些东西很有用的

答:需要安装手机驱动,http://dl.google.com/android/android_usb_windows.zip,并且要在手机设置中将允许未知来源的选项选中。

上面的步骤我都做了,怎么还认不出来呢?

答:连接上电脑后,信息栏会问你是否mount,选择mount在电脑中就能认到手机TF卡了。

我连着电脑的时候手机怎么找不到TF卡了?

答:因为USB对TF卡mount以后是独占,别的程序不能同时访问,拔掉USB线以后就能认出了。

G1有黑白名单的功能么?

答:目前还没有,请耐心等待开发组开发。

G1能在SIM卡里建立联系人么?

答:目前不能,以后也许可以。

不开GPRS或者WIFI能使用内置地图功能么?

答:不能,必须要到网络上取地图文件。

删除了原有的APN设置,可再添加不上新的APN了,怎么办?

答:重新启动,再添加。

G1能像其它手机一样更换主题么?

答:可以,但可靠性目前还在验证阶段,有可能对系统造成未知影响。

怎么清理market占用的内存?

答:目前除了恢复出厂设置,没有更好办法。

G1能够和我的Outlook同步么?

答:目前不能,以后会有软件推出。

G1使用什么杀毒软件好?

答:没有杀毒软件,目前android平台上还没有病毒。

设置APN以后即使不上网也会有流量么?

答:是的,Gmail要经常跟网络同步,会产生流量。

如何取消Gmail同步?

答:在设置界面中选择Datasynchronization(数据同步)这项,再打开的对户框中把每项都取消勾选,G1就不会再自动同步数据消耗GPRS网络流量了。注:1.6汉化的机器会没有这个选项,只能删除APN。

vps的一些信息
Dec 18th, 2008 by song

以下信息来自网络

Virtuozzo 软件
1) 请参考安装手册进行操作
http://www.swsoft.com.cn/downloads/Virtuozzo/Windows/Docs/vzwin351_ig.pdf

2) 安装中,当提示是否运行Virtuozzo Up2date Wizard更新的时候,选择退出
即不进行更新操作。当整个Virtuozzo都完成安装后,将安装补丁的下载源
从SWsoft美国服务器切换到SWsoft中国镜像服务器,再进行更新

3)在进行了Virtuozzo更新后,即包含了最新语言包,因此无须单独安装语言包了

4)安装完成进行重启后,请把vztools.zip工具解压缩并放到c:\vztools
(注意:必须放到这个目录,否则运行会报错)
双击运行c:\vztools\run.bat
这个向导将引导您进行补丁更新、镜像服务器切换、防病毒加固等措施

5) 如对Virtuozzo的安装过程有问题,请致电技术部门与我们取得联系
电话联系方式:010-64398235-8307
在线工单提交:http://support.swsoft.com.cn/

6) 其他参考材料使用请参考用户手册和培训教程
http://www.swsoft.com.cn/downloads/Virtuozzo/vzwin_sp1_guide.pdf
http://www.swsoft.com.cn/downloads/Virtuozzo/vz_training_ppt.zip

PF设置
Dec 18th, 2008 by song


[code]cd /usr/src/sys/i386/conf/
cp GENERIC PF
ee PF

ident           pf

############################################添加如下:
options    SC_DISABLE_REBOOT    # 关闭重启
options    SMP                  #多CPU支持
device    carp
device    pf
device    pflog
device    pfsync
options    ALTQ
options    ALTQ_CBQ
options    ALTQ_RED
options    ALTQ_RIO
options    ALTQ_HFSC
options    ALTQ_PRIQ
options    ALTQ_NOPCC
options    ALTQ_DEBUG
options    ALTQ_CDNR

############################################
#options          CPU_ENABLE_SSE  #支持SSE指令集
options          PERFMON    #对P4以上CPU优化
options          MPTABLE_FORCE_HTT  #打开超线程支持

######################################删除如下:
#cpu    I486_CPU
#cpu    I586_CPU

#options   MSDOSFS      # MSDOS Filesystem #windows文件系统

#device    fdc      #软驱

#device    atapifd    # ATAPI floppy drives  #软驱
#device    atapist    # ATAPI tape drives  #磁带机

#device    psm    # PS/2 mouse    #鼠标
############ 串口 COM #######
#device    sio    # 8250, 16[45]50 based serial ports
#device    uart    # Generic UART driver
############ 并口打印 #######
#device    ppc
#device    ppbus    # Parallel port bus (required)
#device    lpt    # Printer
#device    plip    # TCP/IP over parallel
#device    ppi    # Parallel port interface device
############ ISA 网卡 ########
#device    cs    # Crystal Semiconductor CS89x0 NIC
# 'device ed' requires 'device miibus'
#device    ed    # NE[12]000, SMC Ultra, 3c503, DS8390 cards
#device    ex    # Intel EtherExpress Pro/10 and Pro/10+
#device    ep    # Etherlink III based cards
#device    fe    # Fujitsu MB8696x based cards
#device    ie    # EtherExpress 8/16, 3C507, StarLAN 10 etc.
#device    sn    # SMC's 9000 series of Ethernet chips
#device    xe    # Xircom pccard Ethernet
############# 无线网卡 #########
#device    wlan    # 802.11 support
#device    wlan_wep  # 802.11 WEP support
#device    wlan_ccmp  # 802.11 CCMP support
#device    wlan_tkip  # 802.11 TKIP support
#device    wlan_amrr  # AMRR transmit rate control algorithm
#device    wlan_scan_ap  # 802.11 AP mode scanning
#device    wlan_scan_sta  # 802.11 STA mode scanning
#device    an    # Aironet 4500/4800 802.11 wireless NICs.
#device    ath    # Atheros pci/cardbus NIC's
#device    ath_hal    # Atheros HAL (Hardware Access Layer)
#device    ath_rate_sample  # SampleRate tx rate control for ath
#device    awi    # BayStack 660 and others
#device    ral    # Ralink Technology RT2500 wireless NICs.
#device    wi    # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
#device    wl    # Older non 802.11 Wavelan wireless NIC.
############# USB 鼠标、扫描 ######
#device    ums    # Mouse
#device    ural    # Ralink Technology RT2500USB wireless NICs
#device    rum    # Ralink Technology RT2501USB wireless NICs
#device    urio    # Diamond Rio 500 MP3 player
device    uscanner  # Scanners
############# USB 网卡 #############
#device    aue    # ADMtek USB Ethernet
#device    axe    # ASIX Electronics USB Ethernet
#device    cdce    # Generic USB over Ethernet
#device    cue    # CATC USB Ethernet
#device    kue    # Kawasaki LSI USB Ethernet
#device    rue    # RealTek RTL8150 USB Ethernet

编译内核
config PF
cd ../compile/PF
make depend
make
make install
reboot

ee /etc/rc.conf

##########添加如下
pf_enable="YES"
pf_rules="/root/script/pf/pf.conf"
pf_flags=""
pflog_enable="YES"
pflog_logfile="/var/log/pflog"
pflog_flags=""

mkdir -p /root/script/pf

ee /root/script/pf/pf.conf

############添加如下:##########

lop_if = "lo0"
ext_if = "rl0"
ser_p = "{ 22, 80, 6954, 3306, 8080, 199, 953, 53 }"
#########拒绝所有通过#############
block drop all
pass quick on lo0 all
######### 最大并发3,每秒最多2个请求,超出则加入动态表:http_table。############
table <http_table> persist
block in quick from <http_table>
pass in quick on $ext_if all keep state (max-src-conn 3, max-src-conn-rate 2/1,overload <http_table> flush global)
#########开放端口###############
pass in on $ext_if proto tcp from any to $ext_if port $ser_p flags S/SA keep state
###########CARP 通行############
pass on { $ext_if } proto carp keep state
###########内网通行#############
pass on $ext_if from 192.168.1.0/24 to any
pass on $ext_if from any to 192.168.1.0/24



常用命令:

pfctl -e          #启动PF
pfctl -d          #停止PF
pfctl -nf /root/script/pf/pf.conf    #检查配置文件错误
pfctl -f /root/script/pf/pf.conf    #重新加载配置
pfctl -sa          #查看PF的所有状态


pfctl -t http_table -T show      #查看动态表
pfctl -t http_table -T add 192.168.1.X    #添加一个IP到表
pfctl -t http_table -T del 192.168.1.X    #从表中删除IP[/code]

FREEBSD + sQUID
Dec 16th, 2008 by song

==> post-installation information for squid-2.6.16_1:

    o You can find the configuration files for this package in the
      directory /usr/local/etc/squid.

    o A cache directory has been created in /usr/local/squid/cache.
      Log files will be written to /usr/local/squid/logs.

      Note:
      You must initialize new cache directories before you can start
      squid.  Do this by running “squid -z” as ‘root’ or ‘squid’.
      If your cache directories are already initialized (e.g. after an
      upgrade of squid) you do not need to initialize them again.

    o The default configuration will deny everyone access to the
      proxy service. Edit the “http_access” directives in
      /usr/local/etc/squid/squid.conf to suit your needs.

    Please note that the Squid start script is an rc.d style script.
    This means that Squid will not start automatically at boot
    time unless it is explicitly enabled.

    To enable Squid, set squid_enable=yes in either
    /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid
    Please see /usr/local/etc/rc.d/squid(.sh) for further details.

    Note:
    If you just updated your Squid installation from 2.5 or earlier,
    make sure to check your Squid configuration against the 2.6 default
    configuration file /usr/local/etc/squid/squid.conf.default.

    Additionally, you should check your configuration by calling
    ‘squid -f /path/to/squid.conf -k parse’ before starting Squid.

===> Installing rc.d startup script(s)
===>   Compressing manual pages for squid-2.6.16_1
===>   Registering installation for squid-2.6.16_1
===> SECURITY REPORT:
     This port has installed the following files which may act as network
     servers and may therefore pose a remote security risk to the system.
/usr/local/sbin/squid

     This port has installed the following startup scripts which may cause
     these network services to be started at boot time.
/usr/local/etc/rc.d/squid

     If there are vulnerabilities in these programs there may be a security
     risk to the system. FreeBSD makes no guarantee about the security of
     ports included in the Ports Collection. Please type ‘make deinstall’
     to deinstall the port if this is a concern.

     For more information, and contact details about the security
     status of this software, see the following webpage:
http://www.squid-cache.org/
===>  Cleaning for squid-2.6.16_1

中国地区信息
Dec 14th, 2008 by song

中国有23个省

河北省(冀)
山西省(晋)
辽宁省(辽)
吉林省(吉)
黑龙江省(黑)
江苏省(苏)
浙江省(浙)
安徽省(皖)
福建省(闽)
江西省(赣)
山东省(鲁)
河南省(豫)
湖北省(鄂)
湖南省(湘)
广东省(粤)
海南省(琼)
四川省(川、蜀)
贵州省(黔、贵)
云南省(滇、云)
陕西省(陕、秦)
甘肃省(甘、陇)
青海省(青)
台湾省(台) Read the rest of this entry »

APACHE PHP 头信息修改
Dec 14th, 2008 by song

为了安全要将Apache及 PHP 的版本隐藏防止XXX人无聊时xxx
,可以用以下方法:

Apache:

开启 httpd.conf,加入以下两行:

ServerTokens ProductOnly

ServerSignature Off

PHP: 隐藏 PHP 版本就是隐藏 “X-Powered-By: PHP/5.1.2-1+b1″ 这个,开启 php.ini,加入: expose_php = Off 完成以上两个设定后,重新启动 Apache 即可。

另外,讲几个最基本的php的安全设置
禁用某些危险函数
disable_functions = system,exec,shell_exec,passthru,popen,dl,phpinfo
关闭错误
display_errors = Off

allow_url_fopen = Off
这个用了很多有XX
safe_mode = On

open_basedir = /usr/local/httpd/htdocs/dir1:/usr/local/httpd/htdocs/dir2



#目录权限控制,dir1中的php程序就无法访问dir2中的内容。反过来也不行

IPTABLE ddos 简单脚本
Dec 14th, 2008 by song

[code]#!/bin/sh

/bin/netstat -na|grep ESTABLISHED|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -rn|head -10|grep -v -E '192.168|127.0'|awk '{if ($2!=null && $1>4) {print $2}}'>/tmp/dropip
for i in $(cat /tmp/dropip)
do
/sbin/iptables -A INPUT -s $i -j DROP
echo "$i kill at `date`">>/var/log/ddos
done[/code]
还没试过
呵呵

群里看到几个笑话 不错
Dec 13th, 2008 by song

2.一犯人被执行枪决 ,由于子弹是劣质的,第一枪没放出,接着又放了
第二枪…第三枪…这时犯人哭了:大哥你掐死我吧,太他妈吓人了!

3.一老太太看完黑人百米赛后,抹着眼泪说:吓死人!几个挖煤的跪成一排被枪
毙,没瞄准就开了枪,娃儿们吓得那个跑呀,绳子都拦不住哇!

4、黄先生热爱革命,为纪念红军,给儿子取名为’军’,
一天送儿子上课,见公交 8路进站,
于是冲儿子大喊:黄军快跑,八路来了!~~~

5、一只小熊去山里创业,农夫给了他一把镰刀,木匠给了他一把锤子,
小熊来到山里遇到老虎,吓得把镰刀、锤子举在头顶,
老虎说:没看出来,就你这熊样还是个党员来!

6、农夫挑担大粪,老外看到后问:大爷,这酱多少钱一斤?
农夫不语,老外用手沾了点放进嘴里,心想:你不告诉我多少钱一斤,
我也不告诉你你的酱都臭了

猪你天天开心拉

BIND9 参数详解
Dec 12th, 2008 by song

BIND9 参数详解 http://bbs.chinaunix.net/viewthread.php?tid=201484
ISC的bind一直以来基本上都是DNS的工业标准,不过BIND一直是漏洞不断,直到出了BIND9,isc的开发人员对bind9进行了重写,才相对好了一点.
BIND9的安装就不用多说了,这里使用最新版本9,.2.3,说白了也就是需要named这个可执行文件就可以了,其他的配置文件完全可以自己来写.如果需要进行服务的控制的话,则需要rndc这个文件了.named大约有4M多,strip一下也就1M多点,再裁减裁减完全可以做到400K的,做嵌入式的朋友也不妨考虑考虑这个了.
服务的启动与停止可以完全自己来写一个脚本来控制,启动的话先判断是否已经启动,pidof named,如果已经启动,则提示已经启动,否则执行named –c /etc/named.conf,停止的时候先判断是否已经启动,是的话则killproc named,否的话提示没有启动,具体可在网上查找.
下面重点来说说BIND9的新功能.
Named.conf是bind9的最先读取的一个文件,named支持如下语句:
Acl
Controls
Include
Key
Logging
Lwres
Options
Server
Trusted-keys
View
Zone
其中主要的是acl,controls,include,logging,key,options,view,zone其他的很少用到我们就来详细的对这些进行解释一下.
Acl用来对bind的访问进行限制,是一个全局的设置,前面配置的acl在整个bind中都适用,和路由器里面的access-list有同工之处,语法是
acl acl-name {
   address_match_list
};
其中的address match list是一个地址列表,如”192.168.0.0/24;”,记住最后一定得有分号,有多个的话中间用分号格开,如192.168.0.0/32;192.168.1.0/24;
bind内置了4个acl分别是:
any(不是all)        对应所有的,也就是0.0.0.0/0.
none        对应为空.
localhost        对应本地机器.
localnets        对应本地网络.
Read the rest of this entry »

SIDEBAR
»
S
I
D
E
B
A
R
«
»  Substance:WordPress   »