#!/usr/bin/python import sys, os import random import string import re choice = random.choice randint = random.randint def dc(n, m=20): return n < randint(0, m-1) base_noun = [ 'TCP', 'IP', 'UDP', 'BGP', 'DNS', 'ARP spoof', 'ARP', 'JavaScript', 'HTML', 'CSS', 'XML', 'SOAP', 'REST', 'SSL', 'socket', 'BSD', 'linux', 'MPI', 'OpenMP', 'SYN/ACK', 'kernel', 'ELF', 'COFF', '68000', 'x86', 'MIPS', 'ethernet', 'MAC', 'C', 'C++', 'Java', 'JSON', 'ruby', 'python', 'linked list', 'radix trie', 'hash table', 'SQL', 'makefile', '/proc', '/dev/null', 'tty', 'regex', 'sed', 'vim', 's/// operation', 'operation', 'port scanner', 'port scan', 'lookup table', 'anti-', ' manual', ' config', 'IRC', 'IRC bot', 'bootloader', 'GNU/', ] # I suppose it would be easier to create rules for a lot of these, but # I think LUTs are fine. base_verb = [ ( 'compile', '-s', '-d', '-r', 'compiling' ), ( 'link', '-s', '-ed', '-er', '-ing' ), ( 'assemble', '-s', '-d', '-r', 'assembling' ), ( 'load', '-s', '-ed', '-er', '-ing' ), ( 'boot', '-s', '-ed', '-er', '-ing' ), ( 'reset', '-s', 'reset', '-ter', '-ting' ), ( 'remove', '-s', '-d', '-r', 'removing' ), ( 'decompile', '-s', '-d', '-r', 'decompiling' ), ( 'unlink', '-s', '-ed', '-er', '-ing' ), ( 'disassemble', '-s', '-d', '-r', 'disassembling' ), ( 'unload', '-s', '-ed', '-er', '-ing' ), ( 'parse', '-s', '-d', '-r', 'parsing' ), ( 'archive', '-s', '-d', '-r', 'archiving' ), ( 'cherry-pick', '-s', '-ed', '-er', '-ing' ), ( 'overwrite', '-s', 'overwrote', '-r', 'overwriting' ), ( 'edit', '-s', '-ed', '-or', '-ing' ), ( 'compute', '-s', '-d', '-r', 'computing' ), ( 'release', '-s', '-d', '-r', 'releasing' ), ( 'transmit', '-s', '-ted', '-ter', '-ting' ), ( 'receive', '-s', '-d', '-r', 'receiving' ), ( 'analyze', '-s', '-d', '-r', 'analyzing' ), ( 'print', '-s', '-ed', '-er', '-ing' ), ( 'save', '-s', '-d', '-r', 'saving' ), ( 'erase', '-s', '-d', '-r', 'erasing' ), ( 'install', '-s', '-ed', '-er', '-ing' ), ( 'scan', '-s', '-ned', '-ner', '-ning' ), ( 'port scan', '-s', '-ned', '-ner', '-ning' ), ( 'nmap', '-s', '-ped', '-per', '-ping' ), ( 'DDOS', '-es', '-sed', '-ser', '-sing' ), ( 'exploit', '-s', '-ed', '-er', '-ing' ), ( 'send', '-s', 'sent', '-er', '-ing' ), ( 'write', '-s', 'wrote', '-r', 'writing' ), ( 'detect', '-s', '-ed', '-or', '-ing' ), ( 'sniff', '-s', '-ed', '-er', '-ing' ), ( 'look up', 'looks up', 'looked up', 'looker upper', 'looking up' ), ( 'check out', 'checks out', 'checked out', 'checker outer', 'checking out' ), ( 'query', 'queries', 'queried', 'querier', 'querying' ), ] base_service = [ 'Google', 'Amazon', 'Stack Overflow', 'Freenode', 'EFnet', 'Usenet', 'this old GeoCities page', 'my website', '\'s website', ] base_hack_object = [ 'the ', 'a(n) ', 'the victim\'s ', 'some ', 'a(n) from ', '\'s ', 'the freeware ', 'a configurable ', 'a working ', 'a pre- ', ] base_tool = [ ' ', ' ', '', ' for ', ' ', 'thing that ', 'thing for ', 'pre- ', 'anti- ', ' tool', ' subsystem', 'professional ', '- hybrid', ] base_tools = [ ' s', ' ', 's', ' ', 'things for ', 'pre- s', ] base_person = [ 'Linus Torvalds', 'Alan Cox', 'Con Colivas', 'Ingo Molnar', 'Hans Reiser', 'Ulrich Drepper', 'Larry Wall', 'William Pitcock', 'Bill Gates', 'Ken Thompson', 'Brian Khernigan', 'Dennis Ritchie', 'Eric S. Raymond', 'Richard M. Stallman', 'DPR', 'Sabu', ] base_system = [ 'Amiga', 'C-64', 'IBM PC', 'Z80', 'VAX', 'the PDP-8', ] base_time = [ 'way back', 'a few years ago', 'in the early 90\'s I think', 'when everybody had a(n) ', 'before anybody knew who was', ] # is intransitive # is singular base_advice = [ 'Try .', 'Did you first?', 'Read up on .', 'Check for a(n) .', 'See if the has already.', 'Did you check the config?', 'Hm, sounds like a problem with the .', 'Doesn\'t look like the is .', 'Check the "" wiki.', 'You probably didn\'t .', 'Check the "" website.', ', then send me the output.', 'Pastebin your config.', 'I think my has a(n) , try that.', ' worked for me.', 'Did you enable the ?', 'No, the . You want a(n) .', 'Do you have a(n) installed?', 'A(n) is needed to .', ' claims you can .', 'I heard when that happens.', 'I saw on , you can .', 'A(n) might do the trick.', 'Make sure to delete your . That stuff is illegal.', 'Did you before you ?', 'Where did you the to?', 'I don\'t know. Ask the guy who wrote your . I think ?', 'Was this with a(n) or a(n) ?', 'Please use the official .', 'That won\'t work. You can\'t just .', ', , and THEN . Sheesh.', 'No, don\'t . recently published a CVE about that.', ', , . This is our motto.', 'Don\'t think too hard about . The will do that.', 'There\'s a(n) exploit floating around somewhere. Check .', 'Simple cannot . You need a good, solid .', 'I had a(n) for