BatchHacker

Custom Console (offline normal)

Mar 7th, 2014
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. cd %temp%\CConsole
  3. if exist config.dat goto loadConfig
  4. set title=Custom Console (CConsole)
  5. set name=user
  6. goto skipLoad
  7. :loadConfig
  8. ren config.dat config.bat
  9. call config.bat
  10. ren config.bat config.dat
  11. title %title%
  12. :skipLoad
  13. if exist %temp%\CConsole\cmds cd %temp%\CConsole\cmds
  14. cls
  15. title %title%
  16. if not "%name%"=="user" goto skipLoad2
  17. cls
  18. :skipLoad2
  19. echo Hello %name%!
  20. echo.
  21. echo Welcome back to CConsole.
  22. echo.
  23. echo type "chelp" to read the default commands.
  24. echo.
  25. :s
  26. set /p c=^>
  27. if "%c%"=="" goto skipLoad2
  28. if "%c%"=="chelp" goto showHelp
  29. if "%c%"=="com" goto setCMD
  30. if "%c%"=="nam" goto setNAM
  31. if "%c%"=="des" goto doDES
  32. if "%c%"=="tit" goto setTIT
  33. if exist %temp%\CConsole\cmds\%c%.ccmd goto runCustomCMD
  34. %c%
  35. goto s
  36. :showHelp
  37. echo.
  38. echo Commands:
  39. echo.
  40. echo com (Setup a custom command)
  41. echo nam (Set up the name)
  42. echo des (Destroys the config file)
  43. echo tit (Set up the title)
  44. echo.
  45. set c=
  46. goto s
  47. :doDES
  48. echo.
  49. echo You called the "destroy service" for the config file.
  50. echo All things you typed in the console will be deleted.
  51. echo are you sure?
  52. echo.
  53. echo [y/n]
  54. echo (The cconsole will close it self if you agree.)
  55. echo (It will clear the ccmds too!)
  56. echo.
  57. choice /n /c:yn
  58. if errorlevel 1 if not errorlevel 2 goto agreeDES
  59. if errorlevel 2 if not errorlevel 3 goto disagreeDES
  60. :disagreeDES
  61. echo.
  62. echo You disagreed.
  63. echo.
  64. goto skipLoad2
  65. :agreeDES
  66. cd %temp%\CConsole\
  67. del config.dat
  68. cd cmds
  69. del /Q *.ccmd
  70. exit
  71. :setTIT
  72. echo.
  73. echo Please type the title.
  74. echo.
  75. set /p title=^>
  76. if "%title%"=="" goto skipLoad2
  77. echo You typed: %title% as the title.
  78. echo Is the title: %title%?
  79. echo.
  80. echo [y/n]
  81. echo.
  82. choice /n /c:yn
  83. if errorlevel 1 if not errorlevel 2 goto agreeNAMT
  84. if errorlevel 2 if not errorlevel 3 goto disagreeNAMT
  85. :disagreeNAMT
  86. echo.
  87. echo so the title is not %title%? okay. Retype it please.
  88. echo.
  89. goto setTIT
  90. :agreeNAMT
  91. cd %temp%\CConsole\
  92. if not exist config.dat goto createDatT
  93. goto skipCDatT
  94. :createDatT
  95. echo REM Generated by CConsole>config.dat
  96. :skipCDatT
  97. echo set title=%title%>>config.dat
  98. title %title%
  99. goto skipLoad2
  100. :setNAM
  101. echo.
  102. echo Please type your name.
  103. echo.
  104. set /p name=^>
  105. if "%name%"=="" goto skipLoad2
  106. echo You typed: %name% as your name.
  107. echo Is your name %name%?
  108. echo.
  109. echo [y/n]
  110. echo.
  111. choice /n /c:yn
  112. if errorlevel 1 if not errorlevel 2 goto agreeNAM
  113. if errorlevel 2 if not errorlevel 3 goto disagreeNAM
  114. :disagreeNAM
  115. echo.
  116. echo so your name is not %name%? okay. Retype it please.
  117. echo.
  118. goto setNAM
  119. :agreeNAM
  120. cd %temp%\CConsole\
  121. if not exist config.dat goto createDat
  122. goto skipCDat
  123. :createDat
  124. echo REM Generated by CConsole>config.dat
  125. :skipCDat
  126. echo set name=%name%>>config.dat
  127. goto skipLoad2
  128. :setCMD
  129. echo.
  130. echo Please type the name of your custom CMD
  131. echo or type "exit" to return to the menu.
  132. echo.
  133. set /p cx=^>
  134. if "%cx%"=="exit" goto skipLoad2
  135. if "%cx%"=="" goto setCMD
  136. echo You typed: "%cx%".
  137. echo Your custom command is %cx%
  138. echo are you agree with it?
  139. echo.
  140. echo [y/n]
  141. echo.
  142. choice /n /c:yn
  143. if errorlevel 1 if not errorlevel 2 goto agree
  144. if errorlevel 2 if not errorlevel 3 goto disagree
  145. :disagree
  146. echo.
  147. echo You disagreed please re-type your custom command.
  148. echo.
  149. goto setCMD
  150. :agree
  151. if "%skipOther%"=="1" goto agree2
  152. echo.
  153. echo Please enter the action.
  154. echo.
  155. :agreex
  156. set /p action=^>
  157. if "%action%"=="" goto agreex
  158. echo.
  159. echo You typed "%action%" as your action.
  160. echo.
  161. echo are you agree with it?
  162. echo.
  163. echo [y/n]
  164. echo.
  165. choice /n /c:yn
  166. if errorlevel 1 if not errorlevel 2 goto agree2
  167. if errorlevel 2 if not errorlevel 3 goto disagree2
  168. :disagree2
  169. echo.
  170. echo You disagreed please re-type your custom action.
  171. echo.
  172. goto agree
  173. :agree2
  174. echo.
  175. echo Your command: %cx%
  176. echo Your action: %action%
  177. echo.
  178. echo So if you type %cx% in the CConsole it will run %action%.
  179. echo.
  180. echo are you agree with it?
  181. echo.
  182. echo [y/n]
  183. echo.
  184. choice /n /c:yn
  185. if errorlevel 1 if not errorlevel 2 goto agree3
  186. if errorlevel 2 if not errorlevel 3 goto disagree3
  187. :disagree3
  188. echo.
  189. echo You disagreed.
  190. echo What do you want to change?
  191. echo.
  192. echo [1] Command
  193. echo [2] Action
  194. choice /n /c:12
  195. if errorlevel 1 if not errorlevel 2 goto prepairEditCommand
  196. if errorlevel 2 if not errorlevel 3 goto prepairEditAction
  197. :prepairEditCommand
  198. set skipOther=1
  199. goto setCMD
  200. :prepairEditAction
  201. goto agreex
  202. :agree3
  203. cd %temp%
  204. if not exist CConsole md CConsole
  205. cd CConsole
  206. if not exist cmds md cmds
  207. cd cmds
  208. echo set cx=%cx%>%cx%.ccmd
  209. echo set action=%action%>>%cx%.ccmd
  210. echo.
  211. echo CMD was saved as %temp%\CConsole\cmds\%cx%.ccmd
  212. echo.
  213. goto skipLoad2
  214. :runCustomCMD
  215. ren %c%.ccmd %c%.bat
  216. call %c%.bat
  217. ren %c%.bat %c%.ccmd
  218. %action%
  219. echo.
  220. goto skipLoad2
Advertisement
Add Comment
Please, Sign In to add comment