|
应该是在下面这个网页上http://predev.wikidot.com/shell需要翻墙3 @" K0 \3 s) A& p/ y8 X8 ?/ g
就是把webshell移植过来,. ]2 e0 L, {2 X5 a5 t& z. g
先安装optware packge,再安装python,
# B3 }4 X/ m1 [$ ~7 ]+ ]: ioptware安装参见; v1 g- B1 G/ B! p8 J- u
如何破解Pre:root权限.ssh登录....* A# M. D2 @; q- I
$ P) u1 f, k& Q
1. SSH into your Pre.通过ssh连接到pre上。
1 i; i( l, u# B7 }. K' @& h& \8 k( m2. 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
% K- I$ W" U: m1 A! b4 O \6 r - sh ./make_certificate.sh1 G. T |: N1 ^# j* B- C) A
复制代码 6. Move WebShell to /opt/share/webshell: 移动webshell- cd ..2 ~# B/ A6 Z5 @% I
- 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
3 `( i1 _! D+ @* a4 t - stop on runlevel [!2]6 `0 N; X' c8 s/ n5 X
2 Y: p1 u! g7 k, s* r4 e; B- console none$ w! _: W1 ~' B9 i
- . p, j; d: ?, R% q" B
- respawn3 A3 K# i" q( I. ^
% E2 `+ c+ Z ~1 Q5 a- exec /opt/bin/python /opt/share/webshell/webshell.py -c "/opt/bin/ssh -p 222 -l $USER localhost" --ssl-disable# R* n. G! t4 \# t6 R. _" _
- 3 {7 p0 o- G. x! ]7 Y
复制代码 where $USER is replaced by your user name. 其中$USER用你的用户名代替。; T# l7 l3 I/ I8 \4 |- _
8. Restart the Pre.重启
0 }, F! @6 T" S& N+ C
! k9 m* H% ^. [; i1 ~- J, x+ a9. Open up your web browser and go to打开浏览器输入
2 I) x. K! l6 i' x" e/ k( o& K: \) h2 Y2 @5 k! A, t+ c
http://127.0.0.1:8022
6 n3 [' S4 l2 Y% k8 ?* b" z* f/ v2 y$ u. Z% m1 ^0 Z
10. Type in your password and you now have a shell. You can run any commands you want now directly on your phone. * f3 a) s2 t' o: Z0 {; G
Note 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.1 t/ A7 S$ B" C5 R
, [6 s# j9 r6 L; O, ]Note Eventually there will be a way to disable the auto-text functions (automatic caps especially).
$ B+ k( ?- X% L" n3 F9 P* n, J0 E* R; H' d5 e$ V. B
Verified to work as typed by optik678 and hopspitfire.: y e+ l0 W: S) s/ x4 o
' M0 m$ W- L% N5 o
[ 本帖最后由 felixw 于 2009-7-24 15:18 编辑 ] |
评分
-
查看全部评分
|