Two little tools for BAT [allyesno]

Source: Internet
Author: User

Author: allyesno

Team: freexploit

Date: 2005-07-15

Site: http://blog.csdn.net/freexploit

The first is to delete the default shared

The second is the query spoofing program demonstration.

Sharedelete 0.1

@ Echo off
CLS
Title sharedelete http://blog.csdn.net/freexploit
Rem sharedelete 0.1 bulid by allyesno in China Guangdong Zhuhai
NET Share IPC $/delete> NUL 2> NUL
If exist share. tmp del share. tmp
NET Share> share. tmp
For/F % I in (share. tmp) Do @ net share % I/delete> NUL 2> NUL
Echo all default shares are successfully deleted!
Echo.
Echo Note: For XP and Win 2003 operating systems, IPC $ cannot be deleted.
Echo. You can enter net share to view the current default share status.
If exist share. tmp del share. tmp
Echo.
Press any key to continue echo.
Pause> NUL
Echo input exit to exit the CMD Control Interface
Echo.
CD/
% WINDIR %/system32/CMD/K

Query cheat 0.1 demo

@ Echo off
Rem query cheat 0.1 demo build by allyesno
Use REM to change TsInternetUser to the user name you want to hide.

If/I "% 1" = "process "(
If/I "% 2" = "TsInternetUser" Echo % 2 No process & goto end
If/I not "% 2" = "" % SystemRoot %/system32/query.exe process % 2 & goto end
% SystemRoot %/system32/query.exe process> % SystemRoot %/system32/process. tmp
Type % SystemRoot %/system32/process. tmp | % SystemRoot %/system32/findstr.exe/I/V "TsInternetUser"
Goto end
)

If/I "% 1" = "session "(
If/I "% 2" = "TsInternetUser" Echo % 2 No session & goto end
If/I not "% 2" = "" % SystemRoot %/system32/query.exe session % 2 & goto end
% SystemRoot %/system32/query.exe session> % SystemRoot %/system32/session. tmp
Type % SystemRoot %/system32/session. tmp | % SystemRoot %/system32/findstr.exe/I/V "TsInternetUser"
Goto end
)

If/I "% 1" = "user "(
If/I "% 2" = "TsInternetUser" Echo % 2 no user & goto end
If/I not "% 2" = "" % SystemRoot %/system32/query.exe USER % 2 & goto end
% SystemRoot %/system32/query.exe user> % SystemRoot %/system32/user. tmp
Type % SystemRoot %/system32/user. tmp | % SystemRoot %/system32/findstr.exe/I/V "TsInternetUser"
Goto end
)

If/I "% 1" = "termserver "(
% SystemRoot %/system32/query.exe termserver
Goto end
)

If "% 1" = "/? "(
Echo query {process ^ | session ^ | termserver ^ | user}
Goto end
)
: Error
Invalid echo Parameter
Echo query {process ^ | session ^ | termserver ^ | user}
: End

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.