-
Notifications
You must be signed in to change notification settings - Fork 0
/
nsa-header.php
36 lines (34 loc) · 1.3 KB
/
nsa-header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
Plugin Name: Add NSA Header
Version: 2.7182
Description: Adds an NSA-Keywords HTTP header to reduce the effectiveness of mass spying operations.
Author: Max Harmony
Author URI: https://www.maxh.me.uk/
License: DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2
License URI: http://www.wtfpl.net/txt/copying/
*/
function build_nsa_header($nKeywords = 9){
$keywords_source = ["2600", "641a", "amtrak", "biological", "border",
"breach", "bullrun", "chemical", "closure", "command", "consulate",
"conus", "critical infrastructure", "cryptanalysis", "detection",
"disaster", "dndo", "drill", "echelon", "emergency", "epidemic",
"evacuation", "exercise", "facility", "five eyes", "fornsat", "g7",
"government", "injection", "interstate", "keyhole", "landing",
"maritime domain", "mystic", "national operations ctr", "nbic",
"nuclear", "ops", "plot", "prism", "radiological", "rapid reaction",
"recovery", "response", "riot", "schengen", "security", "swift",
"target", "xkeyscore"];
$keywords = array_rand($keywords_source, $nKeywords);
foreach($keywords as &$i){
$i = $keywords_source[$i];
}
shuffle($keywords);
$header = "NSA-Keywords: " . implode(", ", $keywords);
return $header;
}
function add_nsa_header(){
header(build_nsa_header());
}
add_action('send_headers', 'add_nsa_header');
?>