Advertisement
FlyFar

techno.hs - a Haskell implementation of a neutered "TECHNO" DOS virus

Jun 27th, 2023
1,735
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haskell 0.46 KB | Cybersecurity | 0 0
  1. import Control.Concurrent;
  2. import System.IO;
  3.  
  4. giveMeALine :: Char -> IO ();
  5. giveMeALine x = putStr (x:"") >> drawCursor;
  6.  
  7. drawCursor :: IO ();
  8. drawCursor = mapM_ g "\" \BS_ \BS"
  9.   where g x | x == ' ' = threadDelay 33333
  10.             | otherwise = putStr $ x:""
  11.  
  12. playTechno :: IO ();
  13. playTechno = return ();
  14. -- TODO: GENERATE TECHNO SONG.
  15.  
  16. main :: IO ();
  17. main = hSetBuffering stdout NoBuffering >>
  18.   forkIO playTechno >> mapM_ giveMeALine "TECHNO   " >> main;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement