|
应该是在下面这个网页上http://predev.wikidot.com/shell需要翻墙
5 h6 _& f9 n( S N就是把webshell移植过来,6 @9 _) F+ L+ @% {$ r8 a& d
先安装optware packge,再安装python,! w, B- e& p% v& J/ `
optware安装参见
3 E2 u5 q6 v) H, s) _/ t% k如何破解Pre:root权限.ssh登录....
" Q) t+ Z5 |6 [. m: K8 S
& a$ C9 c7 l) Q, _# @5 ?/ j: R1. SSH into your Pre.通过ssh连接到pre上。
' J0 |' a) O7 m P2. Download Webshell:下载- wget http://web-shell.googlecode.com/files/WebShell-0.9.6.zip
复制代码 3. Install Python: 安装python- sudo /opt/bin/ipkg-opt install python
复制代码 4. Extract the contents of WebShell-0.9.6.zip: 解压5. Generate a server certificate: 生成服务器证书- cd WebShell-0.9.6
6 ? h9 p" V% J; ` - sh ./make_certificate.sh- p% V' |: L1 a) ^( Y: k
复制代码 6. Move WebShell to /opt/share/webshell: 移动webshell- cd ..# a- E% L1 f: t- q! S$ a
- sudo mv WebShell-0.9.6/ /opt/share/webshell
复制代码 7. Create an upstart script "/etc/event.d/webos-webshell" with the following contents: 创建一个etc/event.d/webos-webshell文件,内容如下- start on stopped finish
$ Q4 Q9 c5 z# W# ^- B - stop on runlevel [!2]" j0 G7 }! c! i# c& l
- * J& G$ V3 u0 {6 a+ X7 E9 t& N$ ~
- console none; I/ [2 E) ^, F1 e |" N2 W* C
6 E, ` c, D- \8 Z- respawn, V. ~; {9 W' L) n
- ! H7 o0 B, i2 ~4 m; p1 g
- exec /opt/bin/python /opt/share/webshell/webshell.py -c "/opt/bin/ssh -p 222 -l $USER localhost" --ssl-disable
- q& _4 k* o$ ]) H0 h* Y9 S
D5 p6 m; X& \" A/ Y; w! k, l0 a
复制代码 where $USER is replaced by your user name. 其中$USER用你的用户名代替。
. o: E8 s8 ]. ~( X! A+ u6 s8. Restart the Pre.重启
8 ?) V4 ]0 c( x
) X7 R" Q, R3 c/ y# U1 L; [6 J0 l9. Open up your web browser and go to打开浏览器输入4 O6 P& G. S. v9 U1 Q" ` ?
f. L6 e @+ xhttp://127.0.0.1:80222 V, a0 I1 Z+ @# g {; x5 |
: c# V# s6 Y# l$ o10. Type in your password and you now have a shell. You can run any commands you want now directly on your phone.
% L4 N+ N5 ^, z6 ^3 k0 p0 LNote If it looks like you are seeing a bunch of text flash at the top of the screen, rotate your phone into Landscape mode, hit the enter key a bunch of times. You will either be able to see the error and can fix it through your version of SSH or you will get a disconnection message. If you do get a disconnected message, hit Refresh and try to login. It should start working then.
8 B4 V0 t: X4 @- ^
( A/ U3 X5 s' ^; u6 r" O7 X2 z: n% qNote Eventually there will be a way to disable the auto-text functions (automatic caps especially).- m) l3 P5 g6 Y, R0 f$ W6 I! T
9 _- _3 l! Q9 r2 Q2 |7 N& }Verified to work as typed by optik678 and hopspitfire.
9 t# i9 z( y5 Y% Z' b) V! o3 {' z1 [( `6 F! \
[ 本帖最后由 felixw 于 2009-7-24 15:18 编辑 ] |
评分
-
查看全部评分
|