Privilege Escalation using the for command

Source: Internet
Author: User

 
For/r d: \ wwwroot \ web \ chouwazi.com \ % I in (*. asp) do @ echo % I> c: \ windows \ temp \ 1.txt
Is to list all asp files under the d: \ wwwroot \ web \ directory, and then save it to 1.txt under c: \ windows \ temp \
 
================================================= Gorgeous line ========================
 
 
 
For/d % I in (d: \ wwwroot \ web \ *) do @ echo % I
This statement shows all the files under d: \ wwwroot \ web, including folders.
 
================================================= Gorgeous line ========================
 
 
 
For/r d: \ wwwroot \ web \ % I in (*. *) do @ echo % I> d: \ wwwroot \ web1 \ 1.txt
*. * All meaning in DOS
 
That is to say, all files in d: \ wwwroot \ web1 \ are displayed, and then saved in d: \ wwwroot \ web1 \ 1.txt.
 
*. * Indicates any suffix. If it is changed to (*. exe), all the EXE files in the Directory and the following subdirectories will be listed.
 
================================================= Gorgeous line ========================
 
 
 
For/f % c in (d: \ wwwroot \ web \ coon. asp) do @ echo % c
 
 
View the content of the coon. ASP file
 
================================================= Gorgeous line ========================
 
 
 
For/d % I in (???) Do @ echo % I
Name the folder in the current path with only 1-3 letters
 
================================================= Gorgeous line ========================
 
 
 
Type F: \ VIP \ qq1369 \ database \ # Collection. resx echo> c: \ windows \ temp \ 1.mdb
You can use for or type to read the database configuration file of the other party, but the database modifies the suffix name, for example,. resx.
 
So that we can not download, then use the type command to copy the database to c: \ windows \ temp \, www.2cto.com and then download!
 
================================================= Gorgeous line ========================
 
 
 
For/r F: \ chouwazi.com \ % I in (*) do @ echo % I
List all files under the F: \ chouwazi.com \ directory
 
================================================= Gorgeous line ========================
 
 
 
For/r d: \ % I in (2002910021.jpg) do @ echo % I
You can use this command to search for the Directory of the 2002910021.jpg image under D.

From blog of smelly sock

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.