Many of the commands in Linux are very handy to use, especially when you're doing batch processing. (Saying that the program is not complicated, Windows has not engaged in a good shell?) Here are some common applications of shell operations, the use
Set the followingCodeSave As A. BAT file (the following uses Win2000 as an example. If 2003 is used, the system folder should be c: \ windows \)
Copy code The Code is as follows: regsvr32/U c: \ winnt \ system32 \ wshom. ocx
Del c: \ winnt \
However, if you add a user, this shell. Users is enough. In this case, net.exe and ADSI are deleted, which may be a new method for adding users.
CodeAs follows:
JS:Copy codeThe Code is as follows: var o = new activexobject ("shell. Users ");Z =
When writing a Shell filter process, most people use grep to search for the specified process in the output result of ps aux. However, the grep process is also displayed, for example, the pptpd process, two matching items are displayed:
Copy
1. Use pgrep to match the name
Copy codeThe Code is as follows: if test $ (pgrep-f $1 | wc-l)-eq 0
Then
Echo "the process does not exist"
Else
Echo "process"
Fi
The following is a supplement:Processes in the current system:
Apple @ ubuntu :~ $
Go home today and browse cnbeta.com as usual to see what is fresh.
So we can see a Windows Power Shell 1.0
Well, I'm very interested in this. After all, the current Windows Shell is too weak. I immediately downloaded and installed it from the
Using openrowset for shell penetration
To get the SQL injection point, we first thought of the backup webshell. We threw it in the NB and found that the SQL error information was blocked and the physical path was not obtained. Then we wrote a PP
If you are an IT person who is used to Windows command prompt, when you use Linux Command lines for the first time, you will feel at a loss. The DOS command you are familiar with does not exist in Linux. There are a lot of commands to remember
Day 5: function and Task Scheduling
Function advantages
Divide and conquer f
Collaboration
Convenient Management
Easy to maintain
Function Structure
Function Name ()
{
Command 1
Command 2
Command 3
}
Function parameter transfer
Passing parameters to
When I first wrote this version by Ma, I tested the simplified and traditional versions 2003, which should be easy to use. I guess it is probably related to the patch ms06014 on 2003. Parse proposed a solution in the freezing point forum. I studied
File Type:
-F: determines whether the file is a common file.-D: determines whether the directory is used.
-B: determines whether a device file is a block.-C: determines whether a device file is a dual-character device file.-S: Determine whether the
I. Requirements
It is often difficult to enter a password for different linux machines, such as ssh Login or scp file copying. You can generate a public key through ssh-keygen, establish a trusted channel between the two machines.II. Environment
I. Requirements
It is often difficult to enter a password for different linux machines, such as ssh Login or scp file copying. You can generate a public key through ssh-keygen, establish a trusted channel between the two machines.II. Environment
While Syntax:
While [condition]
Do
Command
........
Done
Special while usage:
① While true | while ;;
Do
Done ---------------------- endless loop
② While read line_value
Do
Done
Exercise:
Use the while statement to capture bash
Command-1 & command-2 & command-3 & command-4 &... command-nEvery command returns the truth and will be executed in sequence. When a command returns false, the command chain will be broken.The last one is false. It will be the last command to be
1: grep command:
Grep-v "char" file_name match text that does not contain "char"
Grep-n-w "char" file_name completely matches a character
Grep ^ s $ s is the text that matches the first or last row of s.
2: tr command
Tr set1 set2 replace set
When writing a program, printing out the progress or log information properly often helps us track the running results of the program. However, printing these results or logs on the screen does not serve as a basis for future checks. This is the
Shell Program Design (1) pipelines and redirection redirect output
Chen123 @ ubuntu :~ /C ++ $ ls-l> lsoutput.txt
This command saves the lscommand output to the lsoutput.txt file.
File descriptor 0 represents the standard input of a program, file
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.