Permalink
Browse files

Initial import

  • Loading branch information...
eligrey committed Sep 10, 2017
0 parents commit 9c56b49b512ac1edb6ef762db565430627c15fdc
Showing 432 changed files with 23,353 additions and 0 deletions.
@@ -0,0 +1,58 @@
redirect 301 /testcases http://code.eligrey.com/tests
redirect 301 /tests/webkit/empty-media-queries.xhtml http://code.eligrey.com/testcases/all/empty-media-queries.xhtml
redirect 301 /l10n.js/demo/index.html http://code.eligrey.com/l10n.js/demo.html
redirect 301 /poc/json-sniffing/ http://code.eligrey.com/poc/json-hijacking/
redirect 301 /document-write.js/ http://code.eligrey.com/async-document-write/
redirect 301 /apng-supported.js/apng-supported.js http://code.eligrey.com/apng-detect/apng-detect.js
redirect 301 /apng-supported.js/demo.html http://code.eligrey.com/apng-detect/demo.html
redirect 301 /apng-supported.js/apng-test.png http://code.eligrey.com/apng-detect/apng-test.png
redirect 301 /http-index-format_automator.zip http://code.eligrey.com/http-index-format_automator/http-index-format_automator.zip
redirect 301 /poc/ http://code.eligrey.com/sec/
redirect 301 /sec/data-uri-same-domain/ http://code.eligrey.com/sec/opera/data-uri-same-domain/
Options +Indexes
AddType image/png .ico
AddType application/font-woff .woff
AddType message/http .http
AddType application/json .json
AddType application/vnd.mozilla.xul+xml .xul
AddType application/http-index-format .index
AddType application/java-archive .zip .jar
AddType multipart/related .mht
AddType text/plain .phps .info
AddType text/cache-manifest .cache-manifest
AddDefaultCharset UTF-8
AddCharset UTF-8 .php .css .js .html .xhtml .json .txt
ErrorDocument 404 /404.php
DirectoryIndex DIRECTORYINDEX.php
DefaultType text/plain
RewriteEngine On
RewriteCond %{HTTP_HOST} !^((code|dev).(eligrey|sephr)\.com|localhost)$ [NC]
RewriteRule (.*) http://code.eligrey.com/$1 [R=301,L]
RedirectMatch 204 ^/favicon\.ico$
RewriteCond %{HTTP:User-Agent} Gecko/
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}/DIRECTORYINDEX.php !-f
RewriteRule (.*) /http-index-format_automator.php?dir=$1 [L,QSA]
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(x?html?|txt|css|js|php|json|ttf|otf|eot|ico)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
<FilesMatch "\.(x?html?|txt|css|js|php|json|ttf|otf|eot|woff|ico)$">
Header set Cache-Control "max-age=29030400, public, must-revalidate"
</FilesMatch>
55 404.php
@@ -0,0 +1,55 @@
<?php
$URI=$_SERVER['HTTP_REFERER'];
$SITE="http://".$_SERVER['HTTP_HOST'];
if( !isset($_GET['css']) ) {
header("HTTP/1.1 404 Not Found");
header("Content-Type: text/html; charset=utf-8");
header('Link: </404.php?css>; rel="stylesheet"; type="text/css"; title="404 CSS";');
header('Title: 404');
?><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>404</title>
</head>
<body>
<p>If you were using a browser that supported Link: headers this page would show a fancy 404 error. I reccomend you use <a href="http://www.mozilla.com/firefox/">Firefox</a> and <a href="http://www.opera.com/browser/download/">Opera</a>.</p>
</body>
</html>
<?php
}
else if( isset($_GET['css']) ) {
header("Content-type: text/css; charset: utf-8");
header("Expires: -1");
echo "body {
background: orange;
font-size: 50px;
font-weight: bold;
text-align: center;
color: black;
width: 100%;
margin: 0px;
}
p {
display: none;
}
body:after {
content:\"The URI: ".$URI." could not be found.\"
}
body:hover {
color:white;
}
body:hover:after {
content:\"The URI: →".$URI."← could not be found.\";
}";
}
?>
@@ -0,0 +1,30 @@
This software is licensed under the MIT license.
MIT license
-----------
Copyright &copy; 2008-2015 [Eli Grey][1].
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
[1]: https://eligrey.com
@@ -0,0 +1,20 @@
/*
* apng-detect.js
* 2010-06-13
* By Elijah Grey, http://eligrey.com
*
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
(function() {
"use strict";
var apngTest = new Image(),
ctx = document.createElement("canvas").getContext("2d");
apngTest.onload = function () {
ctx.drawImage(apngTest, 0, 0);
self.apng_supported = ( ctx.getImageData(0, 0, 1, 1).data[3] === 0 );
};
apngTest.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg==";
// frame 1 (skipped on apng-supporting browsers): [0, 0, 0, 255]
// frame 2: [0, 0, 0, 0]
}());
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>apng-detect.js Demo</title>
<script type="text/javascript" src="apng-detect.js"></script>
</head>
<body>
<h1><a href="apng-detect.js">apng-detect.js</a> Demo</h1>
<script type="text/javascript">
//<![CDATA[
if (typeof apng_supported !== "boolean") {
var apng_supported = false;
}
onload = function () {
var apngSupportedHeader = document.createElement("h2"),
supported = document.createElement("span");
supported.style.color = apng_supported ? "green" : "red";
supported.appendChild(document.createTextNode(apng_supported ? "Yes" : "No"));
apngSupportedHeader.appendChild(document.createTextNode("APNG Supported: "));
apngSupportedHeader.appendChild(supported);
document.body.appendChild(apngSupportedHeader);
};
//]]>
</script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4364432-7");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Asynchronous document.write test</title>
<script type="text/javascript" src="http://github.com/eligrey/async-document-write/raw/master/async-document-write.js"></script>
<script type="text/javascript" src="http://github.com/eligrey/async-document-write/raw/master/test1.js" async></script>
</head>
<body>
<script type="text/javascript" src="http://github.com/eligrey/async-document-write/raw/master/test2.js" async></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-4364432-7']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
0 blank
No changes.
@@ -0,0 +1,7 @@
<?php
usleep( 5000 );
header("Access-Control-Allow-Origin: *");
header("Cache-Control: no-cache");
header("Expires: -1");
?>
.
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Bookmarklets</title>
<style type="text/css">
li:target {
background: #DDEEF6;
}
.permalink {
color: inherit;
text-decoration: none;
}
</style>
</head>
<body>
<h1>Bookmarklets</h1>
<ul>
<li id="next-page">
<a href="#next-page" class="permalink">Next page:</a>
<a href="javascript:(function(){var d=location,a=document.querySelector('[rel~=&quot;next&quot;]');if(a){d.href=a.href}else{d.href=d.href.replace(/(\d+)(\D*)$/,function(m,n,e){return +n+1+e})}}());">+</a>
</li>
<li id="prev-page">
<a href="#prev-page" class="permalink">Previous page:</a>
<a href="javascript:(function(){var d=location,b=document.querySelector('[rel~=&quot;prev&quot;]');if(b){d.href=b.href}else{d.href=d.href.replace(/(\d+)(\D*)$/,function(m,n,e){return n-1+e})}}());">-</a>
</li>
</ul>
<script type="text/javascript">
//<![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-4364432-7']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
//]]>
</script>
</body>
</html>
@@ -0,0 +1,12 @@
(function () {
var loc = location,
next = document.querySelector('[rel~="next"]');
if (next) {
loc.href = next.href;
} else {
loc.href = loc.href.replace(/(\d+)(\D*)$/, function (match, number, end) {
return +number + 1 + end;
});
}
}());
@@ -0,0 +1,12 @@
(function () {
var loc = location,
prev = document.querySelector('[rel~="prev"]');
if (prev) {
loc.href = prev.href;
} else {
loc.href = loc.href.replace(/(\d+)\D*$/, function (match, number, end) {
return number - 1 + end;
});
}
}());
Binary file not shown.
@@ -0,0 +1,14 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Name=CIA SSH
Comment[en]=Central Intelligence Agency SSH
Terminal=false
Type=Application
Icon=padlock.svg
Exec=/opt/google/chrome/google-chrome --app="http://code.eligrey.com/cia-ssh/cia-ssh.php"
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;
# You will need to update the Icon path accordingly
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>root@ssh.cia.gov: /home/private</title>
<link rel="icon" href="padlock.svg" sizes="any" type="image/svg+xml"/>
<link rel="icon" href="lock-favicon.png" sizes="16x16" type="image/png"/>
<!-- Lock favicon from the Fugue Icons set by Yusuke Kamiyamane; http://p.yusukekamiyamane.com/ -->
<style type="text/css" title="Secret Government CSS">
@font-face {
font-family: "Glass TTY VT220X";
src: local("Glass TTY VT220X"),
url("VT220X-optimized-for-this-page.ttf.gz") format("truetype");
}
html, body, #ssh {
margin: 0;
padding: 0;
border: 0;
position: fixed;
height: 100%;
width: 100%;
outline: none;
}
#ssh, a /* 'a' to hide auto-links */ {
color: limegreen;
background: black;
text-decoration: none;
font-size: 20px;
font-family: "Glass TTY VT220X", monospace;
}
::-moz-selection {
color: black;
background: limegreen;
}
::selection {
color: black;
background: limegreen;
}
</style>
</head>
<body>
<pre id="ssh"><?php echo $_SERVER['REMOTE_ADDR']; ?>@ssh.cia.gov:~$ su
Password: *****************
root@ssh.cia.gov:/home/<?php echo $_SERVER['REMOTE_ADDR']; ?># cd ../private
root@ssh.cia.gov:/home/private# <span id="cursor">&#x2588;</span></pre>
<script type="text/javascript">
//<![CDATA[
var cursor = document.getElementById("cursor");
setInterval(function () {
cursor.style.visibility = cursor.style.visibility === "hidden" ? "visible" : "hidden";
}, 700);
//]>
</script>
</body>
</html
Binary file not shown.
Oops, something went wrong.

0 comments on commit 9c56b49

Please sign in to comment.