diff --git a/.travis.yml b/.travis.yml
index eb0cc872..028a36d5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
language: node_js
node_js:
- - "node"
+ - node
install: npm install
before_script:
- npm install -g grunt
@@ -11,10 +11,19 @@ script:
- grunt node
- grunt prod
deploy:
- provider: pages
- skip_cleanup: true
- github_token: $GITHUB_TOKEN
- on:
- branch: master
- local_dir: "build/prod/"
- target_branch: gh-pages
+ - provider: pages
+ skip_cleanup: true
+ github_token: $GITHUB_TOKEN
+ local_dir: build/prod/
+ target_branch: gh-pages
+ on:
+ branch: master
+ - provider: releases
+ skip_cleaup: true
+ api_key:
+ secure: Lbya9e1a6bUeJLKsjuqRaNF/BNr7iqSjV0/9rhWbTCc5d1cd+A6DGnDqvw47S2x/+8b08XR5Umas5dS6KU4lLAZQ5DFJgKEuOqUDqz7fOfIZyaRKe8HBTrUn3c1zaqpbrIDQHAOwwEMSx3W+SXmFuniIHRkBFALfK/luyHb4u6e1vq9AsX59A6ICOl5fpGD8kHDtdFZtgCrrZ5tkX5wweiRUbro+LBNlfBCaXeuUwnigU0chAGx8wJWeSvHrndGoPPFEXc0MT4QPlI+q6R3AiO/mwS2/nLhEIGt4jrWUtyFQD9gFLZXg7Z6GC5pKqyf2EQXzgC8Kggybmbg5/MiWj1ns0d1XMK26r50bHD/9K7Kzlh5vq8Sum4DYWtuT4AsWgL/PfUEvB1FbF4InRJoIlbT3pWj9zNFKTyBNcvUchPk1uBE1Ldn5yPPZoSgdKO0ZiGjn/Qx0ByaDMGJbM5KMg3ALewJmaCiCbnvAaVvAm2UY6GrVK15JiGVn08GhliSzsx6E48ZcFtNJBwHK8MAimbTRyHR6aStJbEYIgoNiAjVv5m0twee/XknDvhULG2tor9chwhnqKb4kvaYPqbVuHNPyDT8VkLsHcpgeD2MKxGTq81NBgPz3rP3T1yWMxsuvhxoH91tIT8mU1jo8/e3BJYogKyRZXxwIHaF7ScDQZ4c=
+ file_glob: true
+ file: build/prod/**/*
+ on:
+ repo: gchq/CyberChef
+ tags: true
diff --git a/build/prod/.htaccess b/build/prod/.htaccess
deleted file mode 100755
index 80626724..00000000
--- a/build/prod/.htaccess
+++ /dev/null
@@ -1,50 +0,0 @@
-# Serve up .htm files as binary files rather than text/html.
-# This allows cyberchef.htm to be downloaded rather than opened in the browser.
-AddType application/octet-stream .htm
-
-# Fix Apache bug #45023 where "-gzip" is appended to all ETags, preventing 304 responses
-
"+n.escapeHtml(t.contents)+"
aGVsbG8=
becomes hello
",run:i.a.runFrom,highlight:i.a.highlightFrom,highlightReverse:i.a.highlightTo,inputType:"string",outputType:"byteArray",args:[{name:"Alphabet",type:"editableOption",value:i.a.ALPHABET_OPTIONS},{name:"Remove non‑alphabet chars",type:"boolean",value:i.a.REMOVE_NON_ALPH_CHARS}]},"To Base64":{description:"Base64 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers.hello
becomes aGVsbG8=
",run:i.a.runTo,highlight:i.a.highlightTo,highlightReverse:i.a.highlightFrom,inputType:"byteArray",outputType:"string",args:[{name:"Alphabet",type:"editableOption",value:i.a.ALPHABET_OPTIONS}]},"From Base58":{description:"Base58 (similar to Base64) is a notation for encoding arbitrary byte data. It differs from Base64 by removing easily misread characters (i.e. l, I, 0 and O) to improve human readability.StV1DL6CwTryKyV
becomes hello world
hello world
becomes StV1DL6CwTryKyV
fe023da5
fe023da5
",run:s.a.runAnd,highlight:!0,highlightReverse:!0,inputType:"byteArray",outputType:"byteArray",args:[{name:"Key",type:"toggleString",value:"",toggleValues:s.a.KEY_FORMAT}]},OR:{description:"OR the input with the given key.fe023da5
",run:s.a.runOr,highlight:!0,highlightReverse:!0,inputType:"byteArray",outputType:"byteArray",args:[{name:"Key",type:"toggleString",value:"",toggleValues:s.a.KEY_FORMAT}]},ADD:{description:"ADD the input with the given key (e.g. fe023da5
), MOD 255",run:s.a.runAdd,highlight:!0,highlightReverse:!0,inputType:"byteArray",outputType:"byteArray",args:[{name:"Key",type:"toggleString",value:"",toggleValues:s.a.KEY_FORMAT}]},SUB:{description:"SUB the input with the given key (e.g. fe023da5
), MOD 255",run:s.a.runSub,highlight:!0,highlightReverse:!0,inputType:"byteArray",outputType:"byteArray",args:[{name:"Key",type:"toggleString",value:"",toggleValues:s.a.KEY_FORMAT}]},"From Hex":{description:"Converts a hexadecimal byte string back into a its raw value.ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a
becomes the UTF-8 encoded string Γειά σου
",run:u.a.runFromHex,highlight:u.a.highlightFrom,highlightReverse:u.a.highlightTo,inputType:"string",outputType:"byteArray",args:[{name:"Delimiter",type:"option",value:u.a.HEX_DELIM_OPTIONS}]},"To Hex":{description:"Converts the input string to hexadecimal bytes separated by the specified delimiter.Γειά σου
becomes ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a
",run:u.a.runToHex,highlight:u.a.highlightTo,highlightReverse:u.a.highlightFrom,inputType:"byteArray",outputType:"string",args:[{name:"Delimiter",type:"option",value:u.a.HEX_DELIM_OPTIONS}]},"From Charcode":{description:"Converts unicode character codes back into text.0393 03b5 03b9 03ac 20 03c3 03bf 03c5
becomes Γειά σου
",run:u.a.runFromCharcode,highlight:u.a.highlightFrom,highlightReverse:u.a.highlightTo,inputType:"string",outputType:"byteArray",args:[{name:"Delimiter",type:"option",value:u.a.DELIM_OPTIONS},{name:"Base",type:"number",value:u.a.CHARCODE_BASE}]},"To Charcode":{description:"Converts text to its unicode character code equivalent.Γειά σου
becomes 0393 03b5 03b9 03ac 20 03c3 03bf 03c5
",run:u.a.runToCharcode,highlight:u.a.highlightTo,highlightReverse:u.a.highlightFrom,inputType:"string",outputType:"string",args:[{name:"Delimiter",type:"option",value:u.a.DELIM_OPTIONS},{name:"Base",type:"number",value:u.a.CHARCODE_BASE}]},"From Binary":{description:"Converts a binary string back into its raw form.01001000 01101001
becomes Hi
",run:u.a.runFromBinary,highlight:u.a.highlightFromBinary,highlightReverse:u.a.highlightToBinary,inputType:"string",outputType:"byteArray",args:[{name:"Delimiter",type:"option",value:u.a.BIN_DELIM_OPTIONS}]},"To Binary":{description:"Displays the input data as a binary string.Hi
becomes 01001000 01101001
",run:u.a.runToBinary,highlight:u.a.highlightToBinary,highlightReverse:u.a.highlightFromBinary,inputType:"byteArray",outputType:"string",args:[{name:"Delimiter",type:"option",value:u.a.BIN_DELIM_OPTIONS}]},"From Decimal":{description:"Converts the data from an ordinal integer array back into its raw form.72 101 108 108 111
becomes Hello
",run:u.a.runFromDecimal,inputType:"string",outputType:"byteArray",args:[{name:"Delimiter",type:"option",value:u.a.DELIM_OPTIONS}]},"To Decimal":{description:"Converts the input data to an ordinal integer array.Hello
becomes 72 101 108 108 111
",run:u.a.runToDecimal,inputType:"byteArray",outputType:"string",args:[{name:"Delimiter",type:"option",value:u.a.DELIM_OPTIONS}]},"From Hexdump":{description:"Attempts to convert a hexdump back into raw data. This operation supports many different hexdump variations, but probably not all. Make sure you verify that the data it gives you is correct before continuing analysis.",run:v.a.runFrom,highlight:v.a.highlightFrom,highlightReverse:v.a.highlightTo,inputType:"string",outputType:"byteArray",args:[]},"To Hexdump":{description:"Creates a hexdump of the input data, displaying both the hexademinal values of each byte and an ASCII representation alongside.",run:v.a.runTo,highlight:v.a.highlightTo,highlightReverse:v.a.highlightFrom,inputType:"byteArray",outputType:"string",args:[{name:"Width",type:"number",value:v.a.WIDTH},{name:"Upper case hex",type:"boolean",value:v.a.UPPER_CASE},{name:"Include final length",type:"boolean",value:v.a.INCLUDE_FINAL_LENGTH}]},"From Base":{description:"Converts a number to decimal from a given numerical base.",run:r.a.runFrom,inputType:"string",outputType:"number",args:[{name:"Radix",type:"number",value:r.a.DEFAULT_RADIX}]},"To Base":{description:"Converts a decimal number to a given numerical base.",run:r.a.runTo,inputType:"number",outputType:"string",args:[{name:"Radix",type:"number",value:r.a.DEFAULT_RADIX}]},"From HTML Entity":{description:"Converts HTML entities back to characters&
becomes &
",run:M.a.runFromEntity,inputType:"string",outputType:"string",args:[]},"To HTML Entity":{description:"Converts characters to HTML entities&
becomes &
",run:M.a.runToEntity,inputType:"string",outputType:"string",args:[{name:"Convert all characters",type:"boolean",value:M.a.CONVERT_ALL},{name:"Convert to",type:"option",value:M.a.CONVERT_OPTIONS}]},"Strip HTML tags":{description:"Removes all HTML tags from the input.",run:M.a.runStripTags,inputType:"string",outputType:"string",args:[{name:"Remove indentation",type:"boolean",value:M.a.REMOVE_INDENTATION},{name:"Remove excess line breaks",type:"boolean",value:M.a.REMOVE_LINE_BREAKS}]},"URL Decode":{description:"Converts URI/URL percent-encoded characters back to their raw values.%3d
becomes =
",run:P.a.runFrom,inputType:"string",outputType:"string",args:[]},"URL Encode":{description:"Encodes problematic characters into percent-encoding, a format supported by URIs/URLs.=
becomes %3d
",run:P.a.runTo,inputType:"string",outputType:"string",args:[{name:"Encode all special chars",type:"boolean",value:P.a.ENCODE_ALL}]},"Parse URI":{description:"Pretty prints complicated Uniform Resource Identifier (URI) strings for ease of reading. Particularly useful for Uniform Resource Locators (URLs) with a lot of arguments.",run:P.a.runParse,inputType:"string",outputType:"string",args:[]},"Unescape Unicode Characters":{description:"Converts unicode-escaped character notation back into raw characters.\\u
%u
U+
\\u03c3\\u03bf\\u03c5
becomes σου
",run:O.a.runUnescape,inputType:"string",outputType:"string",args:[{name:"Prefix",type:"option",value:O.a.PREFIXES}]},"From Quoted Printable":{description:"Converts QP-encoded text back to standard text.",run:L.a.runFrom,inputType:"string",outputType:"byteArray",args:[]},"To Quoted Printable":{description:"Quoted-Printable, or QP encoding, is an encoding using printable ASCII characters (alphanumeric and the equals sign '=') to transmit 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean. It is defined as a MIME content transfer encoding for use in e-mail.mnchen-3ya
decodes to münchen
",run:k.a.runToUnicode,inputType:"string",outputType:"string",args:[{name:"Internationalised domain name",type:"boolean",value:k.a.IDN}]},"To Punycode":{description:"Punycode is a way to represent Unicode with the limited character subset of ASCII supported by the Domain Name System.münchen
encodes to mnchen-3ya
",run:k.a.runToAscii,inputType:"string",outputType:"string",args:[{name:"Internationalised domain name",type:"boolean",value:k.a.IDN}]},"From Hex Content":{description:"Translates hexadecimal bytes in text back to raw bytes.foo|3d|bar
becomes foo=bar
.",run:u.a.runFromHexContent,inputType:"string",outputType:"byteArray",args:[]},"To Hex Content":{description:"Converts special characters in a string to hexadecimal.foo=bar
becomes foo|3d|bar
.",run:u.a.runToHexContent,inputType:"byteArray",outputType:"string",args:[{name:"Convert",type:"option",value:u.a.HEX_CONTENT_CONVERT_WHICH},{name:"Print spaces between bytes",type:"boolean",value:u.a.HEX_CONTENT_SPACES_BETWEEN_BYTES}]},"Change IP format":{description:"Convert an IP address from one format to another, e.g. 172.20.23.54
to ac141736
",run:C.a.runChangeIpFormat,inputType:"string",outputType:"string",args:[{name:"Input format",type:"option",value:C.a.IP_FORMAT_LIST},{name:"Output format",type:"option",value:C.a.IP_FORMAT_LIST}]},"Parse IP range":{description:"Given a CIDR range (e.g. 10.0.0.0/24
) or a hyphenated range (e.g. 10.0.0.0 - 10.0.1.0
), this operation provides network information and enumerates all IP addresses in the range.(ax + b) % 26
, and converted back to a letter.",run:p.a.runAffineEnc,highlight:!0,highlightReverse:!0,inputType:"string",outputType:"string",args:[{name:"a",type:"number",value:p.a.AFFINE_A},{name:"b",type:"number",value:p.a.AFFINE_B}]},"Affine Cipher Decode":{description:"The Affine cipher is a type of monoalphabetic substitution cipher. To decrypt, each letter in an alphabet is mapped to its numeric equivalent, decrypted by a mathematical function, and converted back to a letter.",run:p.a.runAffineDec,highlight:!0,highlightReverse:!0,inputType:"string",outputType:"string",args:[{name:"a",type:"number",value:p.a.AFFINE_A},{name:"b",type:"number",value:p.a.AFFINE_B}]},"Atbash Cipher":{description:"Atbash is a mono-alphabetic substitution cipher originally used to encode the Hebrew alphabet. It has been modified here for use with the Latin alphabet.",run:p.a.runAtbash,highlight:!0,highlightReverse:!0,inputType:"string",outputType:"string",args:[]},"Rotate right":{description:"Rotates each byte to the right by the number of bits specified. Currently only supports 8-bit values.",run:N.a.runRotr,highlight:!0,highlightReverse:!0,inputType:"byteArray",outputType:"byteArray",args:[{name:"Number of bits",type:"number",value:N.a.ROTATE_AMOUNT},{name:"Rotate as a whole",type:"boolean",value:N.a.ROTATE_WHOLE}]},"Rotate left":{description:"Rotates each byte to the left by the number of bits specified. Currently only supports 8-bit values.",run:N.a.runRotl,highlight:!0,highlightReverse:!0,inputType:"byteArray",outputType:"byteArray",args:[{name:"Number of bits",type:"number",value:N.a.ROTATE_AMOUNT},{name:"Rotate as a whole",type:"boolean",value:N.a.ROTATE_WHOLE}]},ROT13:{description:"A simple caesar substitution cipher which rotates alphabet characters by the specified amount (default 13).",run:N.a.runRot13,highlight:!0,highlightReverse:!0,inputType:"byteArray",outputType:"byteArray",args:[{name:"Rotate lower case chars",type:"boolean",value:N.a.ROT13_LOWERCASE},{name:"Rotate upper case chars",type:"boolean",value:N.a.ROT13_UPPERCASE},{name:"Amount",type:"number",value:N.a.ROT13_AMOUNT}]},ROT47:{description:"A slightly more complex variation of a caesar cipher, which includes ASCII characters from 33 '!' to 126 '~'. Default rotation: 47.",run:N.a.runRot47,highlight:!0,highlightReverse:!0,inputType:"byteArray",outputType:"byteArray",args:[{name:"Amount",type:"number",value:N.a.ROT47_AMOUNT}]},"Strip HTTP headers":{description:"Removes HTTP headers from a request or response by looking for the first instance of a double newline.",run:S.a.runStripHeaders,inputType:"string",outputType:"string",args:[]},"Parse User Agent":{description:"Attempts to identify and categorise information contained in a user-agent string.",run:S.a.runParseUserAgent,inputType:"string",outputType:"string",args:[]},"Format MAC addresses":{description:"Displays given MAC addresses in multiple different formats.0x00
) from the input.",run:z.a.runRemoveNulls,inputType:"byteArray",outputType:"byteArray",args:[]},"Drop bytes":{description:"Cuts the specified number of bytes out of the data.",run:z.a.runDropBytes,inputType:"byteArray",outputType:"byteArray",args:[{name:"Start",type:"number",value:z.a.DROP_START},{name:"Length",type:"number",value:z.a.DROP_LENGTH},{name:"Apply to each line",type:"boolean",value:z.a.APPLY_TO_EACH_LINE}]},"Take bytes":{description:"Takes a slice of the specified number of bytes from the data.",run:z.a.runTakeBytes,inputType:"byteArray",outputType:"byteArray",args:[{name:"Start",type:"number",value:z.a.TAKE_START},{name:"Length",type:"number",value:z.a.TAKE_LENGTH},{name:"Apply to each line",type:"boolean",value:z.a.APPLY_TO_EACH_LINE}]},"Pad lines":{description:"Add the specified number of the specified character to the beginning or end of each line",run:z.a.runPad,inputType:"string",outputType:"string",args:[{name:"Position",type:"option",value:z.a.PAD_POSITION},{name:"Length",type:"number",value:z.a.PAD_LENGTH},{name:"Character",type:"binaryShortString",value:z.a.PAD_CHAR}]},Reverse:{description:"Reverses the input string.",run:U.a.runReverse,inputType:"byteArray",outputType:"byteArray",args:[{name:"By",type:"option",value:U.a.REVERSE_BY}]},Sort:{description:"Alphabetically sorts strings separated by the specified delimiter.710.65.0.456
, this will match 10.65.0.45
so always check the original input!",run:y.a.runIp,inputType:"string",outputType:"string",args:[{name:"IPv4",type:"boolean",value:y.a.INCLUDE_IPV4},{name:"IPv6",type:"boolean",value:y.a.INCLUDE_IPV6},{name:"Remove local IPv4 addresses",type:"boolean",value:y.a.REMOVE_LOCAL},{name:"Display total",type:"boolean",value:y.a.DISPLAY_TOTAL}]},"Extract email addresses":{description:"Extracts all email addresses from the input.",run:y.a.runEmail,inputType:"string",outputType:"string",args:[{name:"Display total",type:"boolean",value:y.a.DISPLAY_TOTAL}]},"Extract MAC addresses":{description:"Extracts all Media Access Control (MAC) addresses from the input.",run:y.a.runMac,inputType:"string",outputType:"string",args:[{name:"Display total",type:"boolean",value:y.a.DISPLAY_TOTAL}]},"Extract URLs":{description:"Extracts Uniform Resource Locators (URLs) from the input. The protocol (http, ftp etc.) is required otherwise there will be far too many false positives.",run:y.a.runUrls,inputType:"string",outputType:"string",args:[{name:"Display total",type:"boolean",value:y.a.DISPLAY_TOTAL}]},"Extract domains":{description:"Extracts domain names with common Top-Level Domains (TLDs).yyyy-mm-dd
dd/mm/yyyy
mm/dd/yyyy
978346800
becomes Mon 1 January 2001 11:00:00 UTC
",run:f.a.runFromUnixTimestamp,inputType:"number",outputType:"string",args:[{name:"Units",type:"option",value:f.a.UNITS}]},"To UNIX Timestamp":{description:"Parses a datetime string and returns the corresponding UNIX timestamp.Mon 1 January 2001 11:00:00 UTC
becomes 978346800
",run:f.a.runToUnixTimestamp,inputType:"string",outputType:"number",args:[{name:"Units",type:"option",value:f.a.UNITS}]},"Translate DateTime Format":{description:"Parses a datetime string in one format and re-writes it in another.a-z
becomes abcdefghijklmnopqrstuvwxyz
.",run:U.a.runExpandAlphRange,inputType:"string",outputType:"string",args:[{name:"Delimiter",type:"binaryString",value:""}]},Diff:{description:"Compares two inputs (separated by the specified delimiter) and highlights the differences between them.",run:B.a.runDiff,inputType:"string",outputType:"html",args:[{name:"Sample delimiter",type:"binaryString",value:B.a.DIFF_SAMPLE_DELIMITER},{name:"Diff by",type:"option",value:B.a.DIFF_BY},{name:"Show added",type:"boolean",value:!0},{name:"Show removed",type:"boolean",value:!0},{name:"Ignore whitespace (relevant for word and line)",type:"boolean",value:!1}]},"Parse UNIX file permissions":{description:"Given a UNIX/Linux file permission string in octal or textual format, this operation explains which permissions are granted to which user groups.755
) or textual (e.g. drwxr-xr-x
) format.",run:T.a.runParseUnixPerms,inputType:"string",outputType:"string",args:[]},"Swap endianness":{description:"Switches the data from big-endian to little-endian or vice-versa. Data can be read in as hexadecimal or raw bytes. It will be returned in the same format as it is entered.",run:g.a.runSwapEndianness,highlight:!0,highlightReverse:!0,inputType:"string",outputType:"string",args:[{name:"Data format",type:"option",value:g.a.DATA_FORMAT},{name:"Word length (bytes)",type:"number",value:g.a.WORD_LENGTH},{name:"Pad incomplete words",type:"boolean",value:g.a.PAD_INCOMPLETE_WORDS}]},"Syntax highlighter":{description:"Adds syntax highlighting to a range of source code languages. Note that this will not indent the code. Use one of the 'Beautify' operations for that.",run:h.a.runSyntaxHighlight,highlight:!0,highlightReverse:!0,inputType:"string",outputType:"html",args:[{name:"Language/File extension",type:"option",value:h.a.LANGUAGES},{name:"Display line numbers",type:"boolean",value:h.a.LINE_NUMS}]},"Parse escaped string":{description:"Replaces escaped characters with the bytes they represent.Hello\\nWorld
becomes Hello
World
",run:B.a.runParseEscapedString,inputType:"string",outputType:"string",args:[]},"TCP/IP Checksum":{description:"Calculates the checksum for a TCP (Transport Control Protocol) or IP (Internet Protocol) header from an input of raw bytes.",run:c.a.runTCPIP,inputType:"byteArray",outputType:"string",args:[]},"Parse colour code":{description:"Converts a colour code in a standard format to other standard formats and displays the colour itself.#d9edf7
rgba(217,237,247,1)
hsla(200,65%,91%,1)
cmyk(0.12, 0.04, 0.00, 0.03)
window.crypto
if available and falling back to Math.random
if not.",run:R.a.runGenerateV4,inputType:"string",outputType:"string",args:[]},Substitute:{description:"A substitution cipher allowing you to specify bytes to replace with other byte values. This can be used to create Caesar ciphers but is more powerful as any byte value can be substituted, not just letters, and the substitution values need not be in order.\\n
or \\x0a
.0123456789
can be written as 0-9
.",run:p.a.runSubstitute,inputType:"byteArray",outputType:"byteArray",args:[{name:"Plaintext",type:"binaryString",value:p.a.SUBS_PLAINTEXT},{name:"Ciphertext",type:"binaryString",value:p.a.SUBS_CIPHERTEXT}]},"To Morse Code":{description:"Translates alphanumeric characters into International Morse Code.SOS
becomes ... --- ...
",run:I.a.runTo,inputType:"string",outputType:"string",args:[{name:"Format options",type:"option",value:I.a.FORMAT_OPTIONS},{name:"Letter delimiter",type:"option",value:I.a.LETTER_DELIM_OPTIONS},{name:"Word delimiter",type:"option",value:I.a.WORD_DELIM_OPTIONS}]},"From Morse Code":{description:"Translates Morse Code into (upper case) alphanumeric characters.",run:I.a.runFrom,inputType:"string",outputType:"string",args:[{name:"Letter delimiter",type:"option",value:I.a.LETTER_DELIM_OPTIONS},{name:"Word delimiter",type:"option",value:I.a.WORD_DELIM_OPTIONS}]},Tar:{description:"Packs the input into a tarball.>>0?1:0),G=G+rt,V=V+ot+(G>>>0