Advertisement
xosski

Hacker typer(look ma no hands)

Jan 9th, 2025
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. @echo off
  2. title Hackertyper
  3.  
  4. :main
  5. cls
  6. color a
  7.  
  8. set /p kleur="Kleur: "
  9.  
  10. call :setColor %kleur%
  11.  
  12. cls
  13. goto main
  14.  
  15. :setColor
  16. if "%1"=="zwart" set kleur=0
  17. if "%1"=="blauw" set kleur=1
  18. if "%1"=="groen" set kleur=2
  19. if "%1"=="aqua" set kleur=3
  20. if "%1"=="rood" set kleur=4
  21. if "%1"=="paars" set kleur=5
  22. if "%1"=="geel" set kleur=6
  23. if "%1"=="wit" set kleur=7
  24. if "%1"=="regenboog" call :regenboog
  25. if "%1"=="special" call :special
  26. if not defined kleur (
  27. echo Invalid color. Please try again.
  28. pause
  29. goto main
  30. )
  31.  
  32. color %kleur%
  33.  
  34. :matrix
  35. echo %random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%
  36. pause > nul
  37. goto matrix
  38.  
  39. :regenboog
  40. cls
  41. echo Random Rainbow Colors
  42. :regenLoop
  43. set /a rand=%random% %% 7 + 1
  44. color %rand%
  45. echo %random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%
  46. pause > nul
  47. goto regenLoop
  48.  
  49. :special
  50. cls
  51. color 02
  52.  
  53. echo struct group_info init_groups = { .usage = ATOMIC_INIT(2) };
  54. pause > nul
  55. echo.
  56. echo struct group_info *groups_alloc(int gidsetsize){
  57. pause > nul
  58. echo.
  59. echo struct group_info *group_info;
  60. pause > nul
  61. echo.
  62. echo int nblocks;
  63. pause > nul
  64. echo.
  65. echo int i;
  66. pause > nul
  67. echo.
  68. echo nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK;
  69. pause > nul
  70. echo.
  71. echo nblocks = nblocks ? 1 : 1;
  72. pause > nul
  73. echo.
  74. echo group_info = kmalloc(sizeof(*group_info) + nblocks * sizeof(gid_t *), GFP_USER);
  75. pause > nul
  76. echo.
  77. echo if (!group_info)
  78. pause > nul
  79. echo.
  80. echo return NULL;
  81. pause > nul
  82. echo.
  83. echo group_info->ngroups = gidsetsize;
  84. pause > nul
  85. echo.
  86. echo group_info->nblocks = nblocks;
  87. pause > nul
  88. echo.
  89. echo atomic_set(&group_info->usage, 1);
  90. pause > nul
  91. echo.
  92. echo if (gidsetsize <= NGROUPS_SMALL)
  93. pause > nul
  94. echo group_info->blocks[0] = group_info->small_block;
  95. pause > nul
  96. echo else {
  97. pause > nul
  98. echo for (i = 0; i < nblocks; i++) {
  99. pause > nul
  100. echo gid_t *b;
  101. pause > nul
  102. echo b = (void *)__get_free_page(GFP_USER);
  103. pause > nul
  104. echo if (!b) goto out_undo_partial_alloc;
  105. pause > nul
  106. echo group_info->blocks[i] = b;
  107. pause > nul
  108. echo }
  109. pause > nul
  110. echo }
  111. pause > nul
  112. echo return group_info;
  113. pause > nul
  114. echo out_undo_partial_alloc:
  115. pause > nul
  116. echo while (--i >= 0) {
  117. pause > nul
  118. echo free_page((unsigned long)group_info->blocks[i]);
  119. pause > nul
  120. echo }
  121. pause > nul
  122. echo kfree(group_info);
  123. pause > nul
  124. echo return NULL;
  125. pause > nul
  126. echo }
  127. pause > nul
  128. echo EXPORT_SYMBOL(groups_alloc);
  129. pause > nul
  130. echo void groups_free(struct group_info *group_info) {
  131. pause > nul
  132. echo if (group_info->blocks[0] != group_info->small_block) {
  133. pause > nul
  134. echo int i;
  135. pause > nul
  136. echo for (i = 0; i < group_info->nblocks; i++)
  137. pause > nul
  138. echo free_page((unsigned long)group_info->blocks[i]);
  139. pause > nul
  140. echo }
  141. pause > nul
  142. echo kfree(group_info);
  143. pause > nul
  144. echo }
  145. pause > nul
  146. echo EXPORT_SYMBOL(groups_free);
  147. pause > nul
  148. echo Return to main menu? (y/n)
  149. set /p choice="Choice: "
  150. if /i "%choice%"=="y" goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement