· 8 years ago · Feb 03, 2018, 04:14 AM
1import asyncio
2import json
3
4import codecs
5import os
6import random
7import re
8
9from cloudbot import hook
10from cloudbot.util import textgen
11
12nick_re = re.compile("^[A-Za-z0-9_|.\-\]\[\{\}]*$", re.I)
13
14#
15# https://github.com/CloudBotIRC/CloudBot/tree/master/plugins
16#
17# Hack5190 (at) gmail.com
18#
19# v1.0 - 3-Feb-2018 - Initial release
20#
21
22spookwords = ['Waihopai, INFOSEC', 'ASPIC', 'MI6', 'Information Security', 'SAI', 'Information Warfare', 'Information Terrorism',
23 'Terrorism Defensive Information', 'Defense Information Warfare', 'Offensive Information Warfare',
24 'Counter Terrorism Security', 'AUSTEO', 'SARA', 'Rapid Reaction', 'JSOFC3IP', 'Corporate Security',
25 'Electronic Surveillance', 'AADCCS', 'DABM', 'DAIRSDIA', 'DALATS', 'DALATS', 'DIFAX', 'PSM', 'SECMANs',
26 'tampering', 'COCOT', 'NACSINSCT', 'SCIF', 'FLiR', 'JIC', 'bce', 'Lacrosse', 'Flashbangs', 'HRT', 'IRA',
27 'EODG', 'DIA', 'USCOI', 'CID', 'BOP', 'FINCEN', 'FLETC', 'NIJ', 'ACC', 'AFSPC', 'BMDOSASSTIXS', 'NAVWAN',
28 'NRL', 'RL', 'NAVWCWPNS', 'NSWC', 'USAFA', 'AHPCRC', 'ARPA', 'SARD', 'LABLINK', 'USACIL', 'NRCNSA/CSS',
29 'GCHQ', 'DITSA', 'SORT', 'AMEMB', 'NSG', 'HIC', 'EDIGRU', 'LRTS', 'SIGDEV', 'NACSI', 'MEU/SOC,PSAC',
30 'TELINTNRO', 'GRU', 'SRIDRM', 'DST', 'SDF', 'CANUSEYESONLY', 'CANUKUS', 'AUSCANUKUS', 'C4I', 'C3I']
31
32bombs = ['biological weapon scientist', 'nuclear expert', 'chemical activist', 'most wanted person', 'cryptoanarchist',
33 'blac block hacktivist', 'money launderer', 'top secret agent', 'covert agent', 'bad bad bad bad bad guy'
34 'dangerous criminal', 'sexually addicted to young soldiers']
35
36services = ['Indian Central Bureau of Investigation (CBI)', 'Pakistan Directorate of Inter-Services Intelligence (ISI)',
37 'Korean Central Intelligence Agency (KCIA)', 'Irak National Security Council/Bureau [Maktab al-Amn al-Qawmi]',
38 'North Korea Reconnaissance Bureau', 'Ukraine Security Service (Sluzhba Bespeky Ukrayiny - SBU)',
39 'Serbia Counterintelligence Service (Kontraobavesajna Sluzba - KOS)',
40 'Iran Ministry of Intelligence and Security [MOIS] (Vezarat-e Ettela\'at va Amniat-e Keshvar VEVAK)',
41 'JMIC (Joint Military Intelligence College)', '634th Military Intelligence', '21st Space Wing',
42 'DARPA (Defense Advanced Research Projects Agency)', '704th Military Intelligence Brigade',
43 'USASMDC (U.S. Army Space and Missile Defense Commance, Dep.Ch. Staff / Intel & Security)',
44 'DoD-C3I (Command, Control, Communications, Intelligence)',
45 'Marine-C4I (Command, Control, Communications, Computers, Intelligence)']
46
47classifications = ['TEPER SEKRET (TOP SECRET - Albania)', 'SECRET VOJNA TAJNA (TOP VERY SECRET - Balkans)',
48 'NAJVECI TAJNITAJNI (TOP SECRET - Croatia)', 'STROGO SEKRENTO (SECRET SECRET - Balkans)',
49 'COBEOWEHHO (CLASSIFIED - Russia)', 'TSILKOM SEKRETNE (TOP SECRET - Ukraine)', 'SZIGOR\'UAN TITKOS (TOP SECRET - Hungary)',
50 'SANGAT RAHASIA (TOP SECRET - Indonesia)', 'BENKOLI SERRI (TOP SECRET - Iran)', 'SODI BEYOTER (TOP SECRET - Israel)']
51
52military = ['BRGE (french Brigade de Renseignement et de Guerre Electronique)', 'EloAufkl (german Elektronische Aufklärung)',
53 'C4I2 (OTAN Comand, Control, Communications, Computers, Inteligence & Interoperability)',
54 'CJTF (US Counterterrorist Joint Task Force)', 'CRW (UK Counter-Revolutionary Warfare)',
55 'DCI (cuban Departemento de Contra-Inteligencia)', 'FSK (rumanian Federal\'naya Sloujba Kontrrazviedki)',
56 'ISI (pakistan Inter-Service Intelligence)', 'TsSR (NIS Tsienntral\'naya Sloujba Razviedki)',
57 'SAVAK (Iran Sazman-i Amniyat Va Ittila\'at-i Kishvar)', 'UKUSA (United Kingdom - USA Security Agreement)']
58
59sources = ['ultra confidential encrypted documents', 'top secret counterintelligence imagery',
60 'highly classified steganographic codes', 'sensitive secured letters deciphered',
61 'email addresses with logins & passwords', 'civil rights anonymous remailers logs'
62 'cypherpunk & mixmaster remailers logs', 'anarchists and terrorists nym servers logs',
63 'web based CGI proxys & Anonymizers logs', 'encryption products & snake oil backdoors']
64
65contacts = ['fsb@fsb.ru', 'svr@gov.ru', 'ceib1@bol.net.in', 'mfa@smip.sv.gov.yu', 'webmaster@mit.gov.tr',
66 'fatf.contact@oecd.org', 'd3ripc@interpol.int', 'info@igis.gov.au', 'citss@cse-cst.gc.ca',
67 'liaison@gcsb.govt.nz', 'recruitment.gchq@dial.pipex.com', 'dia_mil@hotmail.com',
68 'AskPublicAffairs@state.gov', 'nipc.watch@fbi.gov', 'president@whitehouse.gov',
69 'Michael_Miron@ita.doc.gov', 'W2KGuides@nsa.gov', 'HIRC@mail.house.gov']
70
71def is_valid(target):
72 """ Checks if a string is a valid IRC nick. """
73 if nick_re.match(target):
74 return True
75 else:
76 return False
77
78@asyncio.coroutine
79@hook.command
80def nsa(text, action):
81 """<user> - shares information from the NSA about <user>"""
82 user = text.strip()
83
84 if not is_valid(user):
85 return "I can't share any information on that user."
86
87 bomb = random.choices(bombs)
88 mil = random.choice(military)
89 source = random.choice(sources)
90 service = random.choice(services)
91 contact = random.choice(contacts)
92 spook = random.choice(spookwords)
93 classification = random.choice(classifications)
94
95 # action out the message
96
97 action("The folowing message marked {} was intercepted during transmission from the {} to {}.".format(classification, service, contact))
98 action("ALERT: {} has {} related to {} and {}.".format(user, source, bomb, spook))
99 action("{} is wanted by the {}.".format(user, mil))