Login Register






[Ruby] Micro size Auditor [Updated] filter_list
Author
Message
[Ruby] Micro size Auditor [Updated] #1
A long time ago, when I started learning Ruby, I made a censor that was upwards of 200 lines. I made this in about 5 minutes and chopped it down to 13, without copyright and credit.

I plan on adding a wordlist (possibly in a separate txt so it can be customized)
Anyway, enjoy!




Code:
#Micro auditor by Nightc||ed, ©2015 puts "Enter string:" text = gets.chomp puts "Text to audit:" audit = gets.chomp words = text.split(" ") words.each do |word| if word == audit print "[snip] " else print word + " " end end sleep




Update:
-Swapped user inputted omitting for wordlist

Code:
Code:
#by Nightc||ed, ©2015 puts "Enter string: " text = gets.chomp redact = File.read("wordlist.txt").split(" ") words = text.split(" ") system "cls" puts "Result:" words.each do |word| if redact.include? word print "[snip] " else print word + " " end end sleep

current wordlist:
Spoiler: Highly profane (obviously)
Code:
anal anus arse ass ballsack balls bastard bitch blowjob blow job bollock bollocks bollok bolloks boner boob buttplug cock coon cunt damn dick dildo dyke fag fellate fellatio felching fuck fudgepacker flange Goddamn hell jerk jizz knobend muff nigger nigga penis piss prick pube pussy queer scrotum sex shit slut spunk tit tosser turd twat wank whore
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply