|
应该是在下面这个网页上http://predev.wikidot.com/shell需要翻墙8 H6 s, s+ F( i9 {; a, {4 R
就是把webshell移植过来,
+ t+ T7 p$ ]) b6 L2 e8 n先安装optware packge,再安装python,
$ k: s" J: O- h% e, M/ ~optware安装参见
& s5 ]& Y' V. a0 O* k1 O' A如何破解Pre:root权限.ssh登录....
6 v' ?4 w9 `( ]2 y
3 B, j1 |/ J6 X% V1. SSH into your Pre.通过ssh连接到pre上。
7 q7 X' f& d! S2 {- U4 ^6 p3 ^" ?2. 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
" }( V: W( c, { - sh ./make_certificate.sh7 x: {2 H5 Q# [' Y
复制代码 6. Move WebShell to /opt/share/webshell: 移动webshell- cd ..
9 I+ D( c8 R! N, F1 h/ U( M7 q0 y - 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
& a1 W- i( _% c0 f" C$ D6 h - stop on runlevel [!2]3 n; x7 I; ^/ U; V
- 0 l* N0 @: h( Z/ |9 W2 z
- console none
1 E$ {. n6 q* F
' j$ M/ T! a, w7 n! T- respawn- q0 {( B0 |& @2 K& d4 w2 [
- 0 k. u6 x: B Z4 u9 J3 Y, q
- exec /opt/bin/python /opt/share/webshell/webshell.py -c "/opt/bin/ssh -p 222 -l $USER localhost" --ssl-disable2 x$ \1 a4 U, n/ M4 k9 R
9 B4 ?& o9 W" H4 h' ~
复制代码 where $USER is replaced by your user name. 其中$USER用你的用户名代替。, ~- }2 W$ Y4 _' p
8. Restart the Pre.重启% f+ Q8 w; R2 P: Z/ c0 S
' o- T0 }- ^" A l- ?& }- N3 l* t
9. Open up your web browser and go to打开浏览器输入( h/ x- d3 ]: C$ p2 K4 p$ X
, _# w' D5 R2 X3 H. G6 R) _) A
http://127.0.0.1:8022# I z; X7 h j# e2 S' x7 g& ]
5 f9 ~0 Y0 G: }6 g6 [9 @
10. Type in your password and you now have a shell. You can run any commands you want now directly on your phone. $ ?( k. }" {6 k) f# f9 i
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.& S$ q* O' S I. h4 A1 L. O
- N0 U+ q9 L( Z& v8 n; n
Note Eventually there will be a way to disable the auto-text functions (automatic caps especially).3 U7 F4 _2 `# m" \$ G
6 F, d4 Q& K* r9 ?
Verified to work as typed by optik678 and hopspitfire.
0 T9 J3 J- f8 T# \) D
/ a, \# M, Z9 S" ~[ 本帖最后由 felixw 于 2009-7-24 15:18 编辑 ] |
评分
-
查看全部评分
|