Advertisement
shiftdot515

FBI.SH

Jul 9th, 2019
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.59 KB | None | 0 0
  1. #!/sbin/mksh
  2. #damn now I lost my meta data!
  3. #that wasnt Blues Clues I was laughing about earlier
  4. #Total development time including yanking,the patch, and testing, ONE HOUR
  5. #Was the the fbi guy in #hackers , name in the script, actually, beep.
  6. #it would be hard to read those lines
  7. #strobe a progressive, like Hillary Clinton, with this, if UR the FBI.
  8. #of course not.
  9. #could be modified, to use with dd instead of, patching dd, to have delay=
  10. # feature, like with this.
  11. #cd wherever
  12. #ed -p %ed < fileutils-4.1.dd.ed
  13. #cat > fileutils-4.1.dd.ed < 'EOT'
  14. # e dd.c
  15. # 597a
  16. #   else if (STREQ (name, "udelay"))
  17. #       per_output_block_delay=n;
  18. #       else if (STREQ (name, "delay"))
  19. #           per_output_block_delay=(n)*1000 ;
  20. # .
  21. # 307a
  22. #    udelay=USECS    pause USECS microseconds after every block output\n\
  23. #    delay=MSECS     pause MSECS milliseconds after every block output\n\
  24. # .
  25. # 87c
  26. #  /* yanked from full-write.c, modified to add delay --djl */
  27. # when beep is on the plane, this was in the script
  28. # it's ok at least I got to fckmyM()M
  29. # /* Write LEN bytes at PTR to descriptor DESC, retrying if interrupted.
  30. #    Return LEN upon success, writes (negative) error code otherwise.  */
  31.  
  32. # static unsigned long per_output_block_delay ; /* djl */
  33. # int
  34. # full_write (int desc, const unsigned char *ptr, size_t len)
  35. # {
  36. #   int total_written;
  37.  
  38. #   total_written = 0;
  39. #   while (len > 0)
  40. #     {
  41. #       int written = write (desc, ptr, len);
  42. #       /* write on an old Slackware Linux 1.2.13 returns zero when
  43. #  I try to write more data than there is room on a floppy disk.
  44. #  This puts dd into an infinite loop.  Reproduce with
  45. #  dd if=/dev/zero of=/dev/fd0.  If you have this problem,
  46. #  consider upgrading to a newer kernel.  */
  47. #       if (written < 0)
  48. # {
  49. # #ifdef EINTR
  50. #   if (errno == EINTR)
  51. #     continue;
  52. # #endif
  53. #   return written;
  54. # }
  55. #       total_written += written;
  56. #       ptr += written;
  57. #       len -= written;
  58. #       if ( per_output_block_delay )      
  59. # usleep(per_output_block_delay);  /* pause here for delay --djl */
  60. #     }
  61. #   return total_written;
  62. # }
  63. # .
  64. # w
  65. # q
  66. # meta-x comment-region
  67. #'EOT'
  68. #that's actually useful for reading failing hardware. quite a few times.
  69. #but I wrote it, for ansi animation viewing bs=6 udelay=300, and tweek.
  70. #in college.
  71. #f/u willy. #just had to get that in.
  72. #music
  73. #Against All Odds
  74. #Postal Service, UR intrpretation, gives me a flashback to 1984, when Kim Wolf
  75. #sat w/ me for a week, to get my vote for class song -- of the year.
  76. #I told her, thats the take, when I liked it the 1st time
  77. #so she got my vote.
  78.  
  79. # P.S.: strobe, a list of pids
  80. # Or, start and stop them, periodically, with some random fuzzfactor.
  81.  
  82. integer x
  83. while kill -0 $@ ;  # I prefer some kind of loop discriminant here not :
  84. do
  85.     for P in $@  ;     #stop 'em
  86.     do
  87.         kill -s STOP $P  # or -s TSTP
  88.     done
  89.     #delay , or with some fuzz
  90.     (( x = $RANDOM % 7 ))
  91.     if (( x == 0 || x >= 5 )) then
  92.         sleep ${delay:-2.5}
  93.     elif  (( x == 2 || x == 4 )) then
  94.         sleep $(( 2 * ${delay:-3} ))
  95.     else
  96.         sleep $(( ${delay:-3} / 2 ))
  97.     fi
  98.  
  99.     for P in $@ ; do ps -p $P ; done  # what's going on
  100.  
  101.     for P in $@ ;     #tell them to resume.
  102.     do
  103.        kill -s CONT $P
  104.     done
  105.      (( x = $RANDOM % 7 ))
  106.     if (( x == 0 || x >= 5 )) then
  107.         sleep ${delay:-2.5}
  108.     elif  (( x == 2 || x == 4 )) then
  109.         sleep $(( 2 * ${delay:-3} ))
  110.     else
  111.         sleep $(( ${delay:-3} / 2 ))
  112.     fi
  113.     for P in $@ ; do ps -p $P ; done  #/me no ps -p 1,2,3 feature
  114. done
  115. #Already at end-of-file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement