|
应该是在下面这个网页上http://predev.wikidot.com/shell需要翻墙
" ]0 H5 y5 Q7 }& n就是把webshell移植过来,
) F6 i& w/ @* s8 l先安装optware packge,再安装python,
1 o( A9 o8 d- soptware安装参见) F$ r3 j) K4 ~! @6 F! }
如何破解Pre:root权限.ssh登录....
+ z- Y' s$ c% @
& e/ e/ x9 d( T% `) t% e1. SSH into your Pre.通过ssh连接到pre上。
# M3 J X8 y' t) @( \8 U5 \$ r/ ^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* Z0 D2 C& Y$ v5 v9 E2 u- j
- sh ./make_certificate.sh. b; i9 _6 s. I8 j9 O
复制代码 6. Move WebShell to /opt/share/webshell: 移动webshell- cd ..# x. L/ l/ q& L, z
- 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
4 {4 o8 L9 h* w4 K( N - stop on runlevel [!2]) a4 X1 ~: o! k
- . k9 s+ a: P+ Z$ R( w
- console none
9 _/ ?9 q3 \7 K% o - 0 }2 B& y& R% I. N: O6 c
- respawn) n4 a$ w) T) _4 ?( I- g1 o# X
' z5 V& \: S6 T- exec /opt/bin/python /opt/share/webshell/webshell.py -c "/opt/bin/ssh -p 222 -l $USER localhost" --ssl-disable
1 x; \. `. w: w0 H6 e( J
. x% m/ w, m9 g8 u7 W- ~3 |
复制代码 where $USER is replaced by your user name. 其中$USER用你的用户名代替。
+ N4 M' ^# n' `2 H& z3 n8. Restart the Pre.重启6 U+ M3 }% O! e
7 _" {6 N3 H# H$ J% @
9. Open up your web browser and go to打开浏览器输入
1 E9 S; C6 P4 O9 Q% ` R& J5 ^: W1 H8 O
http://127.0.0.1:8022
$ b2 L( N5 r9 r X5 Q5 O% i7 r
9 g) L0 H+ u* N# m. f10. Type in your password and you now have a shell. You can run any commands you want now directly on your phone. + f, r: s' i9 s* b4 M" u0 M' N
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.
2 n$ N' ^$ ]) z& v! M- d1 g3 e+ y
+ l. V: k$ N j! [7 X0 B# ]Note Eventually there will be a way to disable the auto-text functions (automatic caps especially).4 \- \8 ]% ]+ }7 }! |
1 |# }. r- W3 n' R+ Y3 ?, O
Verified to work as typed by optik678 and hopspitfire.
% v5 H* J9 X8 ]! P. F2 F7 B* [$ G. Z2 u# q! a
[ 本帖最后由 felixw 于 2009-7-24 15:18 编辑 ] |
评分
-
查看全部评分
|