|
![]() | 作者: smallfish [smallfish]
![]() |
登录 |
在2000命令提示符下键入:rundll32.exe shell32.dll,Control_RunDll 可以打开控制版面,键入rundll32.exe shell32.dll,SHExitWindowsEX 8却提示说shell32出错,丢失条目SHExitWindowsEX 并不能实现所说的关机,这是为什么,应该怎么样才能实现在命令行里关机?? |
地主 发表时间: 07/08 11:23 |
![]() | 回复: jackcheng [jackcheng] ![]() |
登录 |
我XP就打不开控制面板 |
B1层 发表时间: 07/08 15:08 |
![]() | 回复: wywwolf [wywwolf] ![]() |
登录 |
好象"rundll32 shell32,SHExitWindowsEx 1" - Shut Down Computer "rundll32 shell32,SHExitWindowsEx 0" - Logoff Current User "rundll32 shell32,SHExitWindowsEx 2" Windows9x Quick Reboot 这些都是WIN9X里用的吧,NT能否使用不确定 我这里有点资料,你可以参考一下 "rundll32 shell32,Control_RunDLL" - Run The Control Panel "rundll32 shell32,OpenAs_RunDLL" - Open The 'Open With...' Window "rundll32 shell32,ShellAboutA Info-Box" - Open 'About Window Window' "rundll32 shell32,Control_RunDLL desk.cpl" - Open Display Properties "rundll32 user,cascadechildwindows" - Cascade All Windows "rundll32 user,tilechildwindows" - Minimize All Child-Windows "rundll32 user,repaintscreen" - Refresh Desktop "rundll32 shell,shellexecute Explorer" - Re-Start Windows Explorer "rundll32 keyboard,disable" - Lock The Keyboard "rundll32 mouse,disable" - Disable Mouse "rundll32 user,swapmousebutton" - Swap Mouse Buttons "rundll32 user,setcursorpos" - Set Cursor Position To (0,0) "rundll32 user,wnetconnectdialog" - Show 'Map Network Drive' Window "rundll32 user,wnetdisconnectdialog" - Show 'Disconnect Network Disk' Window "rundll32 user,disableoemlayer" - Display The BSOD Window note '''(BSOD) = Blue Screen Of Death ''' "rundll32 diskcopy,DiskCopyRunDll" - Show Copy Disk Window "rundll32 rnaui.dll,RnaWizard" - Run 'Internet Connection Wizard', If run with "/1" - silent mode "rundll32 shell32,SHFormatDrive" - Run 'Format Disk (A)' Window "rundll32 shell32,SHExitWindowsEx -1" - Cold Restart Of Windows Explorer "rundll32 shell32,SHExitWindowsEx 1" - Shut Down Computer "rundll32 shell32,SHExitWindowsEx 0" - Logoff Current User "rundll32 shell32,SHExitWindowsEx 2" Windows9x Quick Reboot "rundll32 krnl386.exe,exitkernel" - Force Windows 9x To Exit (no confirmation) "rundll rnaui.dll,RnaDial "MyConnect" - Run 'Net Connection' Dialog "rundll32 msprint2.dll,RUNDLL_PrintTestPage" - Choose & Print Test Page Of Current Printer "rundll32 user,setcaretblinktime" - Set New Cursor Rate Speed "rundll32 user, setdoubleclicktime" - Set New DblClick Speed (Rate) "rundll32 sysdm.cpl,InstallDevice_Rundll" - Search For non PnP Devices . |
B2层 发表时间: 07/09 21:56 |
![]() | 回复: opin2 [opin2] ![]() |
登录 |
进程必须需关机 权限. |
B3层 发表时间: 07/10 08:31 |
![]() | 回复: shesh [shesh] ![]() |
登录 |
自己写段小程序,调用ExitWindowEx比较好呢.用个最简单的汇编,估计也就 |
B4层 发表时间: 07/10 08:48 |
![]() | 回复: smallfish [smallfish] ![]() |
登录 |
如果用c编程实现的话就不能调用api函数拉,因为c是面向dos编程的。 如果用汇编的话,是否就是调用中断呢?好像没有那个中断的功能直接就关机了吧! 命令行关机2000好像需要有SE_SHUTDOWN_NAME的权限,可是怎么样才能取得那样的权限呢?其实我要做是用c编程关机,我用system函数调用发一个dos命令,在98跟xp下成功了,就是2000不行,也许就是那个权限的问题! |
B5层 发表时间: 07/12 13:49 |
![]() | 回复: leonshoh [leonshoh] ![]() |
登录 |
//Shutdown.c //code by leonshoh //////////////////////////Start Code//////////////////////// #include <windows.h> BOOL SetPrivilege(LPSTR privilege) { HANDLE token; LUID luid; TOKEN_PRIVILEGES tokenPrivileges; if(!OpenProcessToken(GetCurrentProcess(),TOKEN_ALL_ACCESS,&token)) return FALSE; if(!LookupPrivilegevalue(0,privilege,&luid)) return FALSE; tokenPrivileges.PrivilegeCount=1; tokenPrivileges.Privileges[0].Luid=luid; tokenPrivileges.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED; AdjustTokenPrivileges(token,FALSE,&tokenPrivileges,0,0,0); return TRUE; } int main() { if(SetPrivilege(SE_SHUTDOWN_NAME)) ExitWindowsEx(EWX_SHUTDOWN,0); return 0; } ////////////////// End Of File /////////////////////////// |
B6层 发表时间: 07/13 18:10 |
![]() | 回复: smallfish [smallfish] ![]() |
登录 |
用borlandc(纯c)编译一堆错误没法看! 用visualc++编译有一个错误!原来是LookupPrivilegeValue(0,privelege,&luid)中的Value没有大写v。 结果出来可以实现关机了。不过在纯c下调用这个结果文件却不行,can not be run in dos mode!纯c下有没有实现2000关机的办法呢? |
B7层 发表时间: 08/21 14:13 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号