Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An extension of single-byte-decoder.html that tackles CSS (not finished)
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
def main(request, response): | ||
response.headers.set("Content-Type", "text/html;charset=utf-8") | ||
response.content = "<!doctype html><link rel=stylesheet href=single-byte-raw-css.py?label=" + request.GET.first("label") + ">" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def main(request, response): | ||
response.headers.set("Content-Type", "text/css;charset=" + request.GET.first("label")) | ||
bytes = [] | ||
for byte in xrange(255): | ||
if byte in [0x0A, 0x0C, 0x0D, 0x22, 0x5C]: | ||
bytes.append(chr(0x5C)) | ||
bytes.append(chr(byte)) | ||
else: | ||
bytes.append(chr(byte)) | ||
response.content = "body::before { content:\"" + "".join(bytes) + "\" }" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters