Commit a0322729 authored by friendica's avatar friendica

add nsabait - make yourself a political target

parent 0aed4cbb
No preview for this file type
......@@ -4,9 +4,6 @@ to maintain a single password across the organisation.
Optionally authenticates only if a member of a given group in the directory.
The person must have registered with Friendica using the normal registration
procedures in order to have a Friendica user record, contact, and profile.
Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
ldap.conf file to the signing cert for your LDAP server.
......
File added
#nsabait-enable-label {
float: left;
width: 200px;
margin-bottom: 25px;
}
#nsabait-checkbox {
float: left;
}
<?php
/**
* Name: NSA bait
* Description: Make yourself a political target
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*/
function nsabait_load() {
/**
*
* Our demo plugin will attach in three places.
* The first is just prior to storing a local post.
*
*/
register_hook('post_local_start', 'addon/nsabait/nsabait.php', 'nsabait_post_hook');
/**
*
* Then we'll attach into the plugin settings page, and also the
* settings post hook so that we can create and update
* user preferences.
*
*/
register_hook('feature_settings', 'addon/nsabait/nsabait.php', 'nsabait_settings');
register_hook('feature_settings_post', 'addon/nsabait/nsabait.php', 'nsabait_settings_post');
logger("loaded nsabait");
}
function nsabait_unload() {
/**
*
* unload unregisters any hooks created with register_hook
* during load. It may also delete configuration settings
* and any other cleanup.
*
*/
unregister_hook('post_local_start', 'addon/nsabait/nsabait.php', 'nsabait_post_hook');
unregister_hook('feature_settings', 'addon/nsabait/nsabait.php', 'nsabait_settings');
unregister_hook('feature_settings_post', 'addon/nsabait/nsabait.php', 'nsabait_settings_post');
logger("removed nsabait");
}
function nsabait_post_hook($a, &$item) {
/**
*
* An item was posted on the local system.
* We are going to look for specific items:
* - A status post by a profile owner
* - The profile owner must have allowed our plugin
*
*/
logger('nsabait invoked');
if(! local_user()) /* non-zero if this is a logged in user of this system */
return;
if(local_user() != $item['profile_uid']) /* Does this person own the post? */
return;
if($item['parent']) /* If the item has a parent, this is a comment or something else, not a status post. */
return;
/* Retrieve our personal config setting */
$active = get_pconfig(local_user(), 'nsabait', 'enable');
if(! $active)
return;
$words = file_get_contents('addon/nsabait/wordlist.txt');
$nsabait = explode(',',$words);
shuffle($nsabait);
$used = array();
$item['body'] .= "\n";
for($x = 0; $x < 5; $x ++) {
$y = mt_rand(0,count($nsabait));
if((in_array(strtolower(trim($nsabait[$y])),$used)) || (! trim($nsabait[$y]))) {
$x -= 1;
continue;
}
$used[] = strtolower(trim($nsabait[$y]));
$item['body'] .= ' #' . str_replace(' ','_',trim($nsabait[$y]));
}
return;
}
/**
*
* Callback from the settings post function.
* $post contains the $_POST array.
* We will make sure we've got a valid user account
* and if so set our configuration setting for this person.
*
*/
function nsabait_settings_post($a,$post) {
if(! local_user())
return;
if($_POST['nsabait-submit']) {
set_pconfig(local_user(),'nsabait','enable',intval($_POST['nsabait']));
info( t('Nsabait Settings updated.') . EOL);
}
}
/**
*
* Called from the Plugin Setting form.
* Add our own settings info to the page.
*
*/
function nsabait_settings(&$a,&$s) {
if(! local_user())
return;
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/nsabait/nsabait.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */
$enabled = get_pconfig(local_user(),'nsabait','enable');
$checked = (($enabled) ? ' checked="checked" ' : '');
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('NSAbait Settings') . '</h3>';
$s .= '<div id="nsabait-enable-wrapper">';
$s .= '<label id="nsabait-enable-label" for="nsabait-checkbox">' . t('Enable NSAbait Plugin') . '</label>';
$s .= '<input id="nsabait-checkbox" type="checkbox" name="nsabait" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="nsabait-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
}
assassination, attack, domestic security, drill, exercise, cops, law enforcement, authorities, disaster assistance, disaster management, DNDO, national preparedness, mitigation, prevenetion, response, recovery, dirty bpmb domestic nuclear detection, emergency management, emergency response, first responder, homeland security, maritime domain awareness, MDA, national preparedness, initiative, militia, shooting, shots fired, evacuation, deaths, hostage, explosion, police, disaster medical assistance team, organized crime, gangs, national security, state of emergencey, security, breach, threat, standoff, SWAT, screening, lockdown, bomb, crash, looting, riot, emergency landing, pipe bomb, incident, facility, hazmat, nuclear, chemical spill, suspicious package, toxic, national laboratory, nuclear facility, nuclear threat, cloud, plume, radiaton, radioactive, leak, biological infection, chemical burn, biological, epidemic, hazardous, industrial spill, infection, powder, gas, spillover, anthrax, blister agent, chemical agent, exposure, burn, nerve agent, ricin, sarin, North Korea, outbreak, contamination, exposure, virus, evacuation, bacteria, recall, ebola, food poisoning, foot and mouth, H5N1, avian, flu, salmonella, small pox, plague, human to human, influenza, agro terror, tuberculosis, listeria, symptoms, mutation, resistant, antiviral, pandemic, swine, strain, vaccine, E_coli, AMTRAK, communication infrastructure, metro, subway, port authority, black out, service disruption, power lines, body scanner, grid, drug cartel, gang, border, drug war, kidnap, gunfight, IED, terrorism, weapons grade, enriched, car bomb, AQIM, suspicious substance, suicide bomber, cyber security, keylogger, cyber command, _2600_, spammer, phishing, rootkit, phreaking, brute force, mysql injection, cyber terror, worm, hacker, scammers, conficker, Waihopai, INFOSEC, Information Security, Information Warfare, IW, IS, Privacy, Information Terrorism, Terrorism Defensive Information, Defence Information Warfare, Offensive Information, Offensive Information Warfare, National Information Infrastructure, InfoSec, Reno, Compsec, Computer Terrorism, Firewalls, Secure Internet Connections, ISS, Passwords, DefCon V, Hackers, Encryption, Espionage, USDOJ, NSA, CIA, S/Key, SSL, FBI, Secret Service, USSS, Defcon, Military, White House, Undercover, NCCS, Mayfly, PGP, PEM, RSA, Perl-RSA, MSNBC, bet, AOL, AOL TOS, CIS, CBOT, AIMSX, STARLAN, 3B2, BITNET, COSMOS, DATTA, E911, FCIC, HTCIA, IACIS, UT/RUS, JANET, JICC, ReMOB, LEETAC, UTU, VNET, BRLO, BZ, CANSLO, CBNRC, CIDA, JAVA, Active X, Compsec 97, LLC, DERA, Mavricks, Meta-hackers, Steve Case, Tools, Telex, Military Intelligence, Scully, Flame, Infowar, Bubba, Freeh, Archives, Sundevil, jack, Investigation, ISACA, NCSA, spook words, Verisign, Secure, ASIO, Lebed, ICE, NRO, Lexis-Nexis, NSCT, SCIF, FLiR, Lacrosse, Flashbangs, HRT, DIA, USCOI, CID, BOP, FINCEN, FLETC, NIJ, ACC, AFSPC, BMDO, NAVWAN, NRL, RL, NAVWCWPNS, NSWC, USAFA, AHPCRC, ARPA, LABLINK, USACIL, USCG, NRC, ~, CDC, DOE, FMS, HPCC, NTIS, SEL, USCODE, CISE, SIRC, CIM, ISN, DJC, SGC, UNCPCJ, CFC, DREO, CDA, DRA, SHAPE, SACLANT, BECCA, DCJFTF, HALO, HAHO, FKS, _868, GCHQ, DITSA, SORT, AMEMB, NSG, HIC, EDI, SAS, SBS, UDT, GOE, DOE, GEO, Masuda, Forte, AT, GIGN, Exon Shell, CQB, CONUS, CTU, RCMP, GRU, SASR, GSG-9, 22nd SAS, GEOS, EADA, BBE, STEP, Echelon, Dictionary, MD2, MD4, MDA, MYK, _747,_777, _767, MI5, _737, MI6, _757, AK-47, Kh-11, Shayet-13, SADMS, Spetznaz, Recce, _707, CIO, NOCS, Halcon, Duress, RAID, Psyops, grom, D-11, SERT, VIP, ARC, S.E.T. Team, MP5k, DREC, DEVGRP, DF, DSD, FDM, GRU, LRTS, SIGDEV, NACSI, PSAC, PTT, RFI, SIGDASYS, TDM. SUKLO, SUSLO, TELINT, TEXTA. ELF, LF, MF, VHF, UHF, SHF, SASP, WANK, Colonel, domestic disruption, smuggle, 15kg, nitrate, Pretoria, M-14, enigma, Bletchley Park, Clandestine, nkvd, argus, afsatcom, CQB, NVD, Counter Terrorism Security, Rapid Reaction, Corporate Security, Police, sniper, PPS, ASIS, ASLET, TSCM, Security Consulting, High Security, Security Evaluation, Electronic Surveillance, MI-17, Counterterrorism, spies, eavesdropping, debugging, interception, COCOT, rhost, rhosts, SETA, Amherst, Broadside, Capricorn, Gamma, Gorizont, Guppy, Ionosphere, Mole, Keyhole, Kilderkin, Artichoke, Badger, Cornflower, Daisy, Egret, Iris, Hollyhock, Jasmine, Juile, Vinnell, B.D.M.,Sphinx, Stephanie, Reflection, Spoke, Talent, Trump, FX, FXR, IMF, POCSAG, Covert Video, Intiso, r00t, lock picking, Beyond Hope, csystems, passwd, 2600 Magazine, Competitor, EO, Chan, Alouette,executive, Event Security, Mace, Cap-Stun, stakeout, ninja, ASIS, ISA, EOD, Oscor, Merlin, NTT, SL-1, Rolm, TIE, Tie-fighter, PBX, SLI, NTT, MSCJ, MIT, RIT, Time, MSEE, Cable & Wireless, CSE, Embassy, ETA, Porno, Fax, finks, Fax encryption, white noise, pink noise, CRA, M.P.R.I., top secret, Mossberg, 50BMG, Macintosh Security, Macintosh Internet Security, Macintosh Firewalls, Unix Security, VIP Protection, SIG, sweep, Medco, TRD, TDR, sweeping, TELINT, Audiotel, Harvard, 1080H, SWS, Asset, Satellite imagery, force, Cypherpunks, Coderpunks, TRW, remailers, replay, redheads, RX-7, explicit, FLAME, Pornstars, AVN, Playboy, Anonymous, Sex, chaining, codes, Nuclear, subversives, SLIP, toad, fish, data havens, Elvis, quiche, DES, 1*, NATIA, NATOA, sneakers, counterintelligence, industrial espionage, PI, TSCI, industrial intelligence, H.N.P., Juiliett Class Submarine, Locks, loch, Ingram Mac-10, sigvoice, ssa, E.O.D., SEMTEX, penrep, racal, OTP, OSS, Blowpipe, CCS, GSA, Kilo Class, squib, primacord, RSP, Becker, Nerd, fangs, Austin, Comirex, GPMG, Speakeasy, humint, GEODSS, SORO, M5, ANC, zone, SBI, DSS, SAIC, Minox, Keyhole, SAR, Rand Corporation, Wackenhutt, EO, Wackendude, mol, Hillal, GGL, CTU, botux, Virii, CCC, Blacklisted 411, Internet Underground, XS4ALL, Retinal Fetish, Fetish, Yobie, CTP, CATO, Phon-e, Chicago Posse, l0ck, spook keywords, PLA, TDYC, W3, CUD, CdC, Weekly World News, Zen, World Domination, Dead, GRU, M72750, Salsa, Blowfish, Gorelick, Glock, Ft_Meade, press-release, Indigo, wire transfer, e-cash, Bubba the Love Sponge, Digicash, zip, SWAT, Ortega, PPP, crypto-anarchy, AT&T, SGI, SUN, MCI, Blacknet, Middleman, KLM, Blackbird, plutonium, Texas, jihad, SDI, Uzi, Fort Meade, supercomputer, bullion, Blackmednet, Propaganda, ABC, Satellite phones, Planet-1, cryptanalysis, nuclear, FBI, Panama, fissionable, Sears Tower, NORAD, Delta Force, SEAL, virtual, Dolch, secure shell, screws, Black-Ops, Area51, SABC, basement, data-haven, black-bag, TEMPSET, Goodwin, rebels, ID, MD5, IDEA, garbage, market, beef, Stego, unclassified, utopia, orthodox, Alica, SHA, Global, gorilla, Bob, Pseudonyms, MITM, grey Data, VLSI, mega, Leitrim, Yakima, Sugar Grove, Cowboy, Gist, Gatt, Platform, Geraldton, UKUSA, veggie, Morwenstow, Consul, Oratory, Pine Gap, Menwith, Mantis, DSD, BVD, Flintlock, cybercash, government, hate, speedbump, illuminati, president, freedom, cocaine, Roswell, ESN, COS, E.T., credit card, b9, fraud, assasinate, virus, anarchy, rogue, mailbomb, Chelsea, Whitewater, MOD, York, plutonium, William Gates, clone, BATF, SGDN, Nike, Atlas, Delta, TWA, Kiwi, PGP 2.6.2., PGP 5.0i, PGP 5.1, siliconpimp, Lynch, Face, Pixar, IRIDF, eternity server, Skytel, Yukon, Templeton, LUK, Cohiba, Soros, Standford, niche, 51, H&K, USP, sardine, bank, EUB, USP, PCS, NRO, Red Cell, Glock 26, snuffle, Patel, package, ISI, INR, INS, IRS, GRU, RUOP, GSS, NSP, SRI, Ronco, Armani, BOSS, Chobetsu, FBIS, BND, SISDE, FSB, BfV, IB, froglegs, JITEM, SADF, advise, TUSA, HoHoCon, SISMI, FIS, MSW, Spyderco, UOP, SSCI, NIMA, MOIS, SVR, SIN, advisors, SAP, OAU, PFS, Aladdin, chameleon man, Hutsul, CESID, Bess, rail gun, Peering, NB, CBM, CTP, Sardine, SBIRS, SGDN, ADIU, DEADBEEF, IDP, IDF, Halibut, SONANGOL, Flu, Loin, PGP 5.53, EG&G, AIEWS, AMW, WORM, MP5K-SD, WINGS, cdi, DynCorp, UXO, Ti, THAAD, PRIME, SURVIAC
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment