peinneon

NCMDSource

Oct 22nd, 2011
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. echo off
  2. title NCMD
  3. echo Noobist Command Prompt.
  4. echo (C) Copyright to Microsoft Corp.
  5. echo Special Commands can be seen in 'ncmdhelp' command.
  6. color 0a
  7. echo.
  8.  
  9. :cmd
  10. set /p "cmd=[%cd%] "
  11.  
  12. if /i "%cmd%" == "ncmdhelp" goto :ncmdhelp
  13. if /i "%cmd%" == "asciistarwars" goto :telnetsw
  14. if /i "%cmd%" == "cmd" goto :cmdforbidden
  15. if /i "%cmd%" == "unblock" goto :unblockhelp
  16. if /i "%cmd%" == "unblock taskmgr" goto :unblocktaskmgr
  17. if /i "%cmd%" == "unblock regedit" goto :unblockregedit
  18. if /i "%cmd%" == "unblock cmd" goto :unblockcmd
  19. if /i "%cmd%" == "block" goto :blockhelp
  20. if /i "%cmd%" == "block taskmgr" goto :blocktaskmgr
  21. if /i "%cmd%" == "block regedit" goto :blockregedit
  22. if /i "%cmd%" == "block cmd" goto :blockcmd
  23. %cmd%
  24.  
  25. :def
  26. echo.
  27. title NCMD [Last Command Executed: %time%]
  28. goto :cmd
  29.  
  30. :cmdforbidden
  31. echo You don't need it when you use this.
  32. goto :def
  33.  
  34. :telnetsw
  35. if not exist C:\Windows\system32\telnet.exe goto :telnetswerror
  36. set /p "telnetyesno=You are about to open telnet. Make sure you have an internet connection. Continue? (Y/N)"
  37. if /i "%telnetyesno%" == "Y" goto :telnetswdone
  38. goto :def
  39.  
  40. :telnetswdone
  41. color 07
  42. telnet towel.blinkenlights.nl
  43. color 0a
  44. goto :def
  45.  
  46. :telnetswerror
  47. echo Telnet service is disabled. Please enable the telnet service to watch.
  48. goto :def
  49.  
  50. :ncmdhelp
  51. echo Noobist Command Prompt
  52. echo (C) Copyright Microsoft Corp.
  53. echo.
  54. echo Primary Commands:
  55. echo ncmdhelp = Special commands help.
  56. echo.
  57. echo Block Commands:
  58. echo Blocks a program.
  59. echo block = Shows block help.
  60. echo block taskmgr = Blocks Task Manager
  61. echo block regedit = Blocks Registry Editor
  62. echo block cmd = Blocks Command Prompt
  63. echo.
  64. echo Unblock Commands:
  65. echo These commands is used when your program has been blocked.
  66. echo unblock = Shows unblock help.
  67. echo unblock taskmgr = Unblocks Task Manager.
  68. echo unblock regedit = Unblocks Registry Editor.
  69. echo unblock cmd = Unblocks Command Prompt.
  70. echo.
  71. echo Miscellaneous Commands:
  72. echo Just for fun commands only.
  73. echo asciistarwars = Shows Star Wars Episode IV in ASCII. (Needs telnet service and internet connection).
  74. goto :def
  75.  
  76. :unblockhelp
  77. echo Unblock
  78. echo Usage: unblock [program]
  79. echo Function: Unblock programs that has been blocked.
  80. echo.
  81. echo Programs:
  82. echo.
  83. echo taskmgr
  84. echo regedit
  85. echo cmd
  86. echo.
  87. echo Example: unblock taskmgr = Unblocks Task Manager.
  88. goto :def
  89.  
  90. :unblocktaskmgr
  91. echo Unblocking Task Manager...
  92. REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 0 /f
  93. echo Now you can try opening Task Manager again.
  94. goto :def
  95.  
  96. :unblockregedit
  97. echo Unblocking Registry Editor...
  98. REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f
  99. if errorlevel 1 goto :unblockregeditalt
  100. echo Now you can try opening Registry Editor again.
  101. goto :def
  102.  
  103. :unblockregeditalt
  104. echo.
  105. echo An error occured, Trying the second way..
  106. echo 1. Click on the Start - Run and type gpedit.msc on the field.
  107. echo 2. Navigate to:
  108. echo - User Configuration
  109. echo - Administrative Templates
  110. echo - System.
  111. echo 3. On the setting: Prevent access to registry editing tools.
  112. echo 4. Click Disabled and click on the OK button to save settings.
  113. echo 5. You can try opening Registry Editor again.
  114. goto :def
  115.  
  116. :unblockcmd
  117. echo Unblocking Command Prompt...
  118. REG add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 0 /f
  119. if errorlevel 1 goto :unblockerror
  120. echo Now you can try opening Command Prompt again.
  121. goto :def
  122.  
  123. :blockhelp
  124. :unblockhelp
  125. echo block
  126. echo Usage: block [program]
  127. echo Function: Block programs.
  128. echo.
  129. echo Programs:
  130. echo.
  131. echo taskmgr
  132. echo regedit
  133. echo cmd
  134. echo.
  135. echo Example: block taskmgr = Blocks Task Manager.
  136. goto :def
  137.  
  138. :blocktaskmgr
  139. echo Blocking Task Manager...
  140. REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 1 /f
  141. if errorlevel 1 goto :unblockerror
  142. echo You can try opening Task Manager again.
  143. goto :def
  144.  
  145. :blockregedit
  146. echo Blocking Registry Editor...
  147. REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 1 /f
  148. echo You can unblock Registry Editor with unblock command.
  149. goto :def
  150.  
  151. :blockcmd
  152. echo Blocking Command Prompt...
  153. REG add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 1 /f
  154. echo You can unblock Command Prompt with unblock command.
  155. goto :def
  156.  
  157. :unblockerror
  158. echo An error occured, try unblocking Registry Editor.
  159. goto :def
  160.  
Advertisement
Add Comment
Please, Sign In to add comment