OperationConfig.js 136 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881
  1. import Base from "../operations/Base.js";
  2. import Base58 from "../operations/Base58.js";
  3. import Base64 from "../operations/Base64.js";
  4. import BCD from "../operations/BCD.js";
  5. import BitwiseOp from "../operations/BitwiseOp.js";
  6. import ByteRepr from "../operations/ByteRepr.js";
  7. import CharEnc from "../operations/CharEnc.js";
  8. import Cipher from "../operations/Cipher.js";
  9. import Code from "../operations/Code.js";
  10. import Compress from "../operations/Compress.js";
  11. import Convert from "../operations/Convert.js";
  12. import DateTime from "../operations/DateTime.js";
  13. import Diff from "../operations/Diff.js";
  14. import Endian from "../operations/Endian.js";
  15. import Entropy from "../operations/Entropy.js";
  16. import Extract from "../operations/Extract.js";
  17. import Filetime from "../operations/Filetime.js";
  18. import FileType from "../operations/FileType.js";
  19. import Image from "../operations/Image.js";
  20. import Hash from "../operations/Hash.js";
  21. import Hexdump from "../operations/Hexdump.js";
  22. import HTML from "../operations/HTML.js";
  23. import HTTP from "../operations/HTTP.js";
  24. import IP from "../operations/IP.js";
  25. import JS from "../operations/JS.js";
  26. import MAC from "../operations/MAC.js";
  27. import MorseCode from "../operations/MorseCode.js";
  28. import NetBIOS from "../operations/NetBIOS.js";
  29. import PHP from "../operations/PHP.js";
  30. import PublicKey from "../operations/PublicKey.js";
  31. import Punycode from "../operations/Punycode.js";
  32. import Rotate from "../operations/Rotate.js";
  33. import SeqUtils from "../operations/SeqUtils.js";
  34. import Shellcode from "../operations/Shellcode.js";
  35. import StrUtils from "../operations/StrUtils.js";
  36. import Tidy from "../operations/Tidy.js";
  37. import Unicode from "../operations/Unicode.js";
  38. import URL_ from "../operations/URL.js";
  39. /**
  40. * Type definition for an OpConf.
  41. *
  42. * @typedef {Object} OpConf
  43. * @property {string} module - The module to which the operation belongs
  44. * @property {html} description - A description of the operation with optional HTML tags
  45. * @property {string} inputType
  46. * @property {string} outputType
  47. * @property {Function|boolean} [highlight] - A function to calculate the highlight offset, or true
  48. * if the offset does not change
  49. * @property {Function|boolean} [highlightReverse] - A function to calculate the highlight offset
  50. * in reverse, or true if the offset does not change
  51. * @property {boolean} [flowControl] - True if the operation is for Flow Control
  52. * @property {ArgConf[]} [args] - A list of configuration objects for the arguments
  53. */
  54. /**
  55. * Type definition for an ArgConf.
  56. *
  57. * @typedef {Object} ArgConf
  58. * @property {string} name - The display name of the argument
  59. * @property {string} type - The data type of the argument
  60. * @property {*} value
  61. * @property {number[]} [disableArgs] - A list of the indices of the operation's arguments which
  62. * should be toggled on or off when this argument is changed
  63. * @property {boolean} [disabled] - Whether or not this argument starts off disabled
  64. */
  65. /**
  66. * Operation configuration objects.
  67. *
  68. * @author n1474335 [n1474335@gmail.com]
  69. * @copyright Crown Copyright 2016
  70. * @license Apache-2.0
  71. *
  72. * @constant
  73. * @type {Object.<string, OpConf>}
  74. */
  75. const OperationConfig = {
  76. "Fork": {
  77. module: "Default",
  78. description: "Split the input data up based on the specified delimiter and run all subsequent operations on each branch separately.<br><br>For example, to decode multiple Base64 strings, enter them all on separate lines then add the 'Fork' and 'From Base64' operations to the recipe. Each string will be decoded separately.",
  79. inputType: "string",
  80. outputType: "string",
  81. flowControl: true,
  82. args: [
  83. {
  84. name: "Split delimiter",
  85. type: "binaryShortString",
  86. value: "\\n"
  87. },
  88. {
  89. name: "Merge delimiter",
  90. type: "binaryShortString",
  91. value: "\\n"
  92. },
  93. {
  94. name: "Ignore errors",
  95. type: "boolean",
  96. value: false
  97. }
  98. ]
  99. },
  100. "Merge": {
  101. module: "Default",
  102. description: "Consolidate all branches back into a single trunk. The opposite of Fork.",
  103. inputType: "string",
  104. outputType: "string",
  105. flowControl: true,
  106. args: []
  107. },
  108. "Register": {
  109. module: "Default",
  110. description: "Extract data from the input and store it in registers which can then be passed into subsequent operations as arguments. Regular expression capture groups are used to select the data to extract.<br><br>To use registers in arguments, refer to them using the notation <code>$Rn</code> where n is the register number, starting at 0.<br><br>For example:<br>Input: <code>Test</code><br>Extractor: <code>(.*)</code><br>Argument: <code>$R0</code> becomes <code>Test</code><br><br>Registers can be escaped in arguments using a backslash. e.g. <code>\\$R0</code> would become <code>$R0</code> rather than <code>Test</code>.",
  111. inputType: "string",
  112. outputType: "string",
  113. flowControl: true,
  114. args: [
  115. {
  116. name: "Extractor",
  117. type: "binaryString",
  118. value: "([\\s\\S]*)"
  119. },
  120. {
  121. name: "Case insensitive",
  122. type: "boolean",
  123. value: true
  124. },
  125. {
  126. name: "Multiline matching",
  127. type: "boolean",
  128. value: false
  129. },
  130. ]
  131. },
  132. "Jump": {
  133. module: "Default",
  134. description: "Jump forwards or backwards over the specified number of operations.",
  135. inputType: "string",
  136. outputType: "string",
  137. flowControl: true,
  138. args: [
  139. {
  140. name: "Number of operations to jump over",
  141. type: "number",
  142. value: 0
  143. },
  144. {
  145. name: "Maximum jumps (if jumping backwards)",
  146. type: "number",
  147. value: 10
  148. }
  149. ]
  150. },
  151. "Conditional Jump": {
  152. module: "Default",
  153. description: "Conditionally jump forwards or backwards over the specified number of operations based on whether the data matches the specified regular expression.",
  154. inputType: "string",
  155. outputType: "string",
  156. flowControl: true,
  157. args: [
  158. {
  159. name: "Match (regex)",
  160. type: "string",
  161. value: ""
  162. },
  163. {
  164. name: "Number of operations to jump over if match found",
  165. type: "number",
  166. value: 0
  167. },
  168. {
  169. name: "Maximum jumps (if jumping backwards)",
  170. type: "number",
  171. value: 10
  172. }
  173. ]
  174. },
  175. "Return": {
  176. module: "Default",
  177. description: "End execution of operations at this point in the recipe.",
  178. inputType: "string",
  179. outputType: "string",
  180. flowControl: true,
  181. args: []
  182. },
  183. "Comment": {
  184. module: "Default",
  185. description: "Provides a place to write comments within the flow of the recipe. This operation has no computational effect.",
  186. inputType: "string",
  187. outputType: "string",
  188. flowControl: true,
  189. args: [
  190. {
  191. name: "",
  192. type: "text",
  193. value: ""
  194. }
  195. ]
  196. },
  197. "From Base64": {
  198. module: "Default",
  199. 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.<br><br>This operation decodes data from an ASCII Base64 string back into its raw format.<br><br>e.g. <code>aGVsbG8=</code> becomes <code>hello</code>",
  200. highlight: "func",
  201. highlightReverse: "func",
  202. inputType: "string",
  203. outputType: "byteArray",
  204. args: [
  205. {
  206. name: "Alphabet",
  207. type: "editableOption",
  208. value: Base64.ALPHABET_OPTIONS
  209. },
  210. {
  211. name: "Remove non-alphabet chars",
  212. type: "boolean",
  213. value: Base64.REMOVE_NON_ALPH_CHARS
  214. }
  215. ]
  216. },
  217. "To Base64": {
  218. module: "Default",
  219. 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.<br><br>This operation encodes data in an ASCII Base64 string.<br><br>e.g. <code>hello</code> becomes <code>aGVsbG8=</code>",
  220. highlight: "func",
  221. highlightReverse: "func",
  222. inputType: "byteArray",
  223. outputType: "string",
  224. args: [
  225. {
  226. name: "Alphabet",
  227. type: "editableOption",
  228. value: Base64.ALPHABET_OPTIONS
  229. },
  230. ]
  231. },
  232. "From Base58": {
  233. module: "Default",
  234. 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.<br><br>This operation decodes data from an ASCII string (with an alphabet of your choosing, presets included) back into its raw form.<br><br>e.g. <code>StV1DL6CwTryKyV</code> becomes <code>hello world</code><br><br>Base58 is commonly used in cryptocurrencies (Bitcoin, Ripple, etc).",
  235. inputType: "string",
  236. outputType: "byteArray",
  237. args: [
  238. {
  239. name: "Alphabet",
  240. type: "editableOption",
  241. value: Base58.ALPHABET_OPTIONS
  242. },
  243. {
  244. name: "Remove non-alphabet chars",
  245. type: "boolean",
  246. value: Base58.REMOVE_NON_ALPH_CHARS
  247. }
  248. ]
  249. },
  250. "To Base58": {
  251. module: "Default",
  252. 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.<br><br>This operation encodes data in an ASCII string (with an alphabet of your choosing, presets included).<br><br>e.g. <code>hello world</code> becomes <code>StV1DL6CwTryKyV</code><br><br>Base58 is commonly used in cryptocurrencies (Bitcoin, Ripple, etc).",
  253. inputType: "byteArray",
  254. outputType: "string",
  255. args: [
  256. {
  257. name: "Alphabet",
  258. type: "editableOption",
  259. value: Base58.ALPHABET_OPTIONS
  260. },
  261. ]
  262. },
  263. "From Base32": {
  264. module: "Default",
  265. description: "Base32 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. It uses a smaller set of characters than Base64, usually the uppercase alphabet and the numbers 2 to 7.",
  266. inputType: "string",
  267. outputType: "byteArray",
  268. args: [
  269. {
  270. name: "Alphabet",
  271. type: "binaryString",
  272. value: Base64.BASE32_ALPHABET
  273. },
  274. {
  275. name: "Remove non-alphabet chars",
  276. type: "boolean",
  277. value: Base64.REMOVE_NON_ALPH_CHARS
  278. }
  279. ]
  280. },
  281. "To Base32": {
  282. module: "Default",
  283. description: "Base32 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. It uses a smaller set of characters than Base64, usually the uppercase alphabet and the numbers 2 to 7.",
  284. inputType: "byteArray",
  285. outputType: "string",
  286. args: [
  287. {
  288. name: "Alphabet",
  289. type: "binaryString",
  290. value: Base64.BASE32_ALPHABET
  291. }
  292. ]
  293. },
  294. "Show Base64 offsets": {
  295. module: "Default",
  296. description: "When a string is within a block of data and the whole block is Base64'd, the string itself could be represented in Base64 in three distinct ways depending on its offset within the block.<br><br>This operation shows all possible offsets for a given string so that each possible encoding can be considered.",
  297. inputType: "byteArray",
  298. outputType: "html",
  299. args: [
  300. {
  301. name: "Alphabet",
  302. type: "binaryString",
  303. value: Base64.ALPHABET
  304. },
  305. {
  306. name: "Show variable chars and padding",
  307. type: "boolean",
  308. value: Base64.OFFSETS_SHOW_VARIABLE
  309. }
  310. ]
  311. },
  312. "Disassemble x86": {
  313. module: "Shellcode",
  314. description: "Disassembly is the process of translating machine language into assembly language.<br><br>This operation supports 64-bit, 32-bit and 16-bit code written for Intel or AMD x86 processors. It is particularly useful for reverse engineering shellcode.<br><br>Input should be in hexadecimal.",
  315. inputType: "string",
  316. outputType: "string",
  317. args: [
  318. {
  319. name: "Bit mode",
  320. type: "option",
  321. value: Shellcode.MODE
  322. },
  323. {
  324. name: "Compatibility",
  325. type: "option",
  326. value: Shellcode.COMPATIBILITY
  327. },
  328. {
  329. name: "Code Segment (CS)",
  330. type: "number",
  331. value: 16
  332. },
  333. {
  334. name: "Offset (IP)",
  335. type: "number",
  336. value: 0
  337. },
  338. {
  339. name: "Show instruction hex",
  340. type: "boolean",
  341. value: true
  342. },
  343. {
  344. name: "Show instruction position",
  345. type: "boolean",
  346. value: true
  347. }
  348. ]
  349. },
  350. "XOR": {
  351. module: "Default",
  352. description: "XOR the input with the given key.<br>e.g. <code>fe023da5</code><br><br><strong>Options</strong><br><u>Null preserving:</u> If the current byte is 0x00 or the same as the key, skip it.<br><br><u>Scheme:</u><ul><li>Standard - key is unchanged after each round</li><li>Input differential - key is set to the value of the previous unprocessed byte</li><li>Output differential - key is set to the value of the previous processed byte</li></ul>",
  353. highlight: true,
  354. highlightReverse: true,
  355. inputType: "byteArray",
  356. outputType: "byteArray",
  357. args: [
  358. {
  359. name: "Key",
  360. type: "toggleString",
  361. value: "",
  362. toggleValues: BitwiseOp.KEY_FORMAT
  363. },
  364. {
  365. name: "Scheme",
  366. type: "option",
  367. value: BitwiseOp.XOR_SCHEME
  368. },
  369. {
  370. name: "Null preserving",
  371. type: "boolean",
  372. value: BitwiseOp.XOR_PRESERVE_NULLS
  373. }
  374. ]
  375. },
  376. "XOR Brute Force": {
  377. module: "Default",
  378. description: "Enumerate all possible XOR solutions. Current maximum key length is 2 due to browser performance.<br><br>Optionally enter a string that you expect to find in the plaintext to filter results (crib).",
  379. inputType: "byteArray",
  380. outputType: "string",
  381. args: [
  382. {
  383. name: "Key length",
  384. type: "number",
  385. value: BitwiseOp.XOR_BRUTE_KEY_LENGTH
  386. },
  387. {
  388. name: "Sample length",
  389. type: "number",
  390. value: BitwiseOp.XOR_BRUTE_SAMPLE_LENGTH
  391. },
  392. {
  393. name: "Sample offset",
  394. type: "number",
  395. value: BitwiseOp.XOR_BRUTE_SAMPLE_OFFSET
  396. },
  397. {
  398. name: "Scheme",
  399. type: "option",
  400. value: BitwiseOp.XOR_SCHEME
  401. },
  402. {
  403. name: "Null preserving",
  404. type: "boolean",
  405. value: BitwiseOp.XOR_PRESERVE_NULLS
  406. },
  407. {
  408. name: "Print key",
  409. type: "boolean",
  410. value: BitwiseOp.XOR_BRUTE_PRINT_KEY
  411. },
  412. {
  413. name: "Output as hex",
  414. type: "boolean",
  415. value: BitwiseOp.XOR_BRUTE_OUTPUT_HEX
  416. },
  417. {
  418. name: "Crib (known plaintext string)",
  419. type: "binaryString",
  420. value: ""
  421. }
  422. ]
  423. },
  424. "NOT": {
  425. module: "Default",
  426. description: "Returns the inverse of each byte.",
  427. highlight: true,
  428. highlightReverse: true,
  429. inputType: "byteArray",
  430. outputType: "byteArray",
  431. args: []
  432. },
  433. "AND": {
  434. module: "Default",
  435. description: "AND the input with the given key.<br>e.g. <code>fe023da5</code>",
  436. highlight: true,
  437. highlightReverse: true,
  438. inputType: "byteArray",
  439. outputType: "byteArray",
  440. args: [
  441. {
  442. name: "Key",
  443. type: "toggleString",
  444. value: "",
  445. toggleValues: BitwiseOp.KEY_FORMAT
  446. }
  447. ]
  448. },
  449. "OR": {
  450. module: "Default",
  451. description: "OR the input with the given key.<br>e.g. <code>fe023da5</code>",
  452. highlight: true,
  453. highlightReverse: true,
  454. inputType: "byteArray",
  455. outputType: "byteArray",
  456. args: [
  457. {
  458. name: "Key",
  459. type: "toggleString",
  460. value: "",
  461. toggleValues: BitwiseOp.KEY_FORMAT
  462. }
  463. ]
  464. },
  465. "ADD": {
  466. module: "Default",
  467. description: "ADD the input with the given key (e.g. <code>fe023da5</code>), MOD 255",
  468. highlight: true,
  469. highlightReverse: true,
  470. inputType: "byteArray",
  471. outputType: "byteArray",
  472. args: [
  473. {
  474. name: "Key",
  475. type: "toggleString",
  476. value: "",
  477. toggleValues: BitwiseOp.KEY_FORMAT
  478. }
  479. ]
  480. },
  481. "SUB": {
  482. module: "Default",
  483. description: "SUB the input with the given key (e.g. <code>fe023da5</code>), MOD 255",
  484. highlight: true,
  485. highlightReverse: true,
  486. inputType: "byteArray",
  487. outputType: "byteArray",
  488. args: [
  489. {
  490. name: "Key",
  491. type: "toggleString",
  492. value: "",
  493. toggleValues: BitwiseOp.KEY_FORMAT
  494. }
  495. ]
  496. },
  497. "From Hex": {
  498. module: "Default",
  499. description: "Converts a hexadecimal byte string back into its raw value.<br><br>e.g. <code>ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a</code> becomes the UTF-8 encoded string <code>Γειά σου</code>",
  500. highlight: "func",
  501. highlightReverse: "func",
  502. inputType: "string",
  503. outputType: "byteArray",
  504. args: [
  505. {
  506. name: "Delimiter",
  507. type: "option",
  508. value: ByteRepr.HEX_DELIM_OPTIONS
  509. }
  510. ]
  511. },
  512. "To Hex": {
  513. module: "Default",
  514. description: "Converts the input string to hexadecimal bytes separated by the specified delimiter.<br><br>e.g. The UTF-8 encoded string <code>Γειά σου</code> becomes <code>ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a</code>",
  515. highlight: "func",
  516. highlightReverse: "func",
  517. inputType: "byteArray",
  518. outputType: "string",
  519. args: [
  520. {
  521. name: "Delimiter",
  522. type: "option",
  523. value: ByteRepr.HEX_DELIM_OPTIONS
  524. }
  525. ]
  526. },
  527. "From Octal": {
  528. module: "Default",
  529. description: "Converts an octal byte string back into its raw value.<br><br>e.g. <code>316 223 316 265 316 271 316 254 40 317 203 316 277 317 205</code> becomes the UTF-8 encoded string <code>Γειά σου</code>",
  530. highlight: false,
  531. highlightReverse: false,
  532. inputType: "string",
  533. outputType: "byteArray",
  534. args: [
  535. {
  536. name: "Delimiter",
  537. type: "option",
  538. value: ByteRepr.DELIM_OPTIONS
  539. }
  540. ]
  541. },
  542. "To Octal": {
  543. module: "Default",
  544. description: "Converts the input string to octal bytes separated by the specified delimiter.<br><br>e.g. The UTF-8 encoded string <code>Γειά σου</code> becomes <code>316 223 316 265 316 271 316 254 40 317 203 316 277 317 205</code>",
  545. highlight: false,
  546. highlightReverse: false,
  547. inputType: "byteArray",
  548. outputType: "string",
  549. args: [
  550. {
  551. name: "Delimiter",
  552. type: "option",
  553. value: ByteRepr.DELIM_OPTIONS
  554. }
  555. ]
  556. },
  557. "From Charcode": {
  558. module: "Default",
  559. description: "Converts unicode character codes back into text.<br><br>e.g. <code>0393 03b5 03b9 03ac 20 03c3 03bf 03c5</code> becomes <code>Γειά σου</code>",
  560. highlight: "func",
  561. highlightReverse: "func",
  562. inputType: "string",
  563. outputType: "byteArray",
  564. args: [
  565. {
  566. name: "Delimiter",
  567. type: "option",
  568. value: ByteRepr.DELIM_OPTIONS
  569. },
  570. {
  571. name: "Base",
  572. type: "number",
  573. value: ByteRepr.CHARCODE_BASE
  574. }
  575. ]
  576. },
  577. "To Charcode": {
  578. module: "Default",
  579. description: "Converts text to its unicode character code equivalent.<br><br>e.g. <code>Γειά σου</code> becomes <code>0393 03b5 03b9 03ac 20 03c3 03bf 03c5</code>",
  580. highlight: "func",
  581. highlightReverse: "func",
  582. inputType: "string",
  583. outputType: "string",
  584. args: [
  585. {
  586. name: "Delimiter",
  587. type: "option",
  588. value: ByteRepr.DELIM_OPTIONS
  589. },
  590. {
  591. name: "Base",
  592. type: "number",
  593. value: ByteRepr.CHARCODE_BASE
  594. }
  595. ]
  596. },
  597. "From Binary": {
  598. module: "Default",
  599. description: "Converts a binary string back into its raw form.<br><br>e.g. <code>01001000 01101001</code> becomes <code>Hi</code>",
  600. highlight: "func",
  601. highlightReverse: "func",
  602. inputType: "string",
  603. outputType: "byteArray",
  604. args: [
  605. {
  606. name: "Delimiter",
  607. type: "option",
  608. value: ByteRepr.BIN_DELIM_OPTIONS
  609. }
  610. ]
  611. },
  612. "To Binary": {
  613. module: "Default",
  614. description: "Displays the input data as a binary string.<br><br>e.g. <code>Hi</code> becomes <code>01001000 01101001</code>",
  615. highlight: "func",
  616. highlightReverse: "func",
  617. inputType: "byteArray",
  618. outputType: "string",
  619. args: [
  620. {
  621. name: "Delimiter",
  622. type: "option",
  623. value: ByteRepr.BIN_DELIM_OPTIONS
  624. }
  625. ]
  626. },
  627. "From Decimal": {
  628. module: "Default",
  629. description: "Converts the data from an ordinal integer array back into its raw form.<br><br>e.g. <code>72 101 108 108 111</code> becomes <code>Hello</code>",
  630. inputType: "string",
  631. outputType: "byteArray",
  632. args: [
  633. {
  634. name: "Delimiter",
  635. type: "option",
  636. value: ByteRepr.DELIM_OPTIONS
  637. }
  638. ]
  639. },
  640. "To Decimal": {
  641. module: "Default",
  642. description: "Converts the input data to an ordinal integer array.<br><br>e.g. <code>Hello</code> becomes <code>72 101 108 108 111</code>",
  643. inputType: "byteArray",
  644. outputType: "string",
  645. args: [
  646. {
  647. name: "Delimiter",
  648. type: "option",
  649. value: ByteRepr.DELIM_OPTIONS
  650. }
  651. ]
  652. },
  653. "From Hexdump": {
  654. module: "Default",
  655. 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.",
  656. highlight: "func",
  657. highlightReverse: "func",
  658. inputType: "string",
  659. outputType: "byteArray",
  660. args: []
  661. },
  662. "To Hexdump": {
  663. module: "Default",
  664. description: "Creates a hexdump of the input data, displaying both the hexadecimal values of each byte and an ASCII representation alongside.",
  665. highlight: "func",
  666. highlightReverse: "func",
  667. inputType: "byteArray",
  668. outputType: "string",
  669. args: [
  670. {
  671. name: "Width",
  672. type: "number",
  673. value: Hexdump.WIDTH
  674. },
  675. {
  676. name: "Upper case hex",
  677. type: "boolean",
  678. value: Hexdump.UPPER_CASE
  679. },
  680. {
  681. name: "Include final length",
  682. type: "boolean",
  683. value: Hexdump.INCLUDE_FINAL_LENGTH
  684. }
  685. ]
  686. },
  687. "From Base": {
  688. module: "Default",
  689. description: "Converts a number to decimal from a given numerical base.",
  690. inputType: "string",
  691. outputType: "number",
  692. args: [
  693. {
  694. name: "Radix",
  695. type: "number",
  696. value: Base.DEFAULT_RADIX
  697. }
  698. ]
  699. },
  700. "To Base": {
  701. module: "Default",
  702. description: "Converts a decimal number to a given numerical base.",
  703. inputType: "number",
  704. outputType: "string",
  705. args: [
  706. {
  707. name: "Radix",
  708. type: "number",
  709. value: Base.DEFAULT_RADIX
  710. }
  711. ]
  712. },
  713. "From HTML Entity": {
  714. module: "Default",
  715. description: "Converts HTML entities back to characters<br><br>e.g. <code>&amp;<span>amp;</span></code> becomes <code>&amp;</code>", // <span> tags required to stop the browser just printing &
  716. inputType: "string",
  717. outputType: "string",
  718. args: []
  719. },
  720. "To HTML Entity": {
  721. module: "Default",
  722. description: "Converts characters to HTML entities<br><br>e.g. <code>&amp;</code> becomes <code>&amp;<span>amp;</span></code>", // <span> tags required to stop the browser just printing &
  723. inputType: "string",
  724. outputType: "string",
  725. args: [
  726. {
  727. name: "Convert all characters",
  728. type: "boolean",
  729. value: HTML.CONVERT_ALL
  730. },
  731. {
  732. name: "Convert to",
  733. type: "option",
  734. value: HTML.CONVERT_OPTIONS
  735. }
  736. ]
  737. },
  738. "Strip HTML tags": {
  739. module: "Default",
  740. description: "Removes all HTML tags from the input.",
  741. inputType: "string",
  742. outputType: "string",
  743. args: [
  744. {
  745. name: "Remove indentation",
  746. type: "boolean",
  747. value: HTML.REMOVE_INDENTATION
  748. },
  749. {
  750. name: "Remove excess line breaks",
  751. type: "boolean",
  752. value: HTML.REMOVE_LINE_BREAKS
  753. }
  754. ]
  755. },
  756. "URL Decode": {
  757. module: "URL",
  758. description: "Converts URI/URL percent-encoded characters back to their raw values.<br><br>e.g. <code>%3d</code> becomes <code>=</code>",
  759. inputType: "string",
  760. outputType: "string",
  761. args: []
  762. },
  763. "URL Encode": {
  764. module: "URL",
  765. description: "Encodes problematic characters into percent-encoding, a format supported by URIs/URLs.<br><br>e.g. <code>=</code> becomes <code>%3d</code>",
  766. inputType: "string",
  767. outputType: "string",
  768. args: [
  769. {
  770. name: "Encode all special chars",
  771. type: "boolean",
  772. value: URL_.ENCODE_ALL
  773. }
  774. ]
  775. },
  776. "Parse URI": {
  777. module: "URL",
  778. 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.",
  779. inputType: "string",
  780. outputType: "string",
  781. args: []
  782. },
  783. "Unescape Unicode Characters": {
  784. module: "Default",
  785. description: "Converts unicode-escaped character notation back into raw characters.<br><br>Supports the prefixes:<ul><li><code>\\u</code></li><li><code>%u</code></li><li><code>U+</code></li></ul>e.g. <code>\\u03c3\\u03bf\\u03c5</code> becomes <code>σου</code>",
  786. inputType: "string",
  787. outputType: "string",
  788. args: [
  789. {
  790. name: "Prefix",
  791. type: "option",
  792. value: Unicode.PREFIXES
  793. }
  794. ]
  795. },
  796. "From Quoted Printable": {
  797. module: "Default",
  798. description: "Converts QP-encoded text back to standard text.",
  799. inputType: "string",
  800. outputType: "byteArray",
  801. args: []
  802. },
  803. "To Quoted Printable": {
  804. module: "Default",
  805. 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.<br><br>QP works by using the equals sign '=' as an escape character. It also limits line length to 76, as some software has limits on line length.",
  806. inputType: "byteArray",
  807. outputType: "string",
  808. args: []
  809. },
  810. "From Punycode": {
  811. module: "Encodings",
  812. description: "Punycode is a way to represent Unicode with the limited character subset of ASCII supported by the Domain Name System.<br><br>e.g. <code>mnchen-3ya</code> decodes to <code>münchen</code>",
  813. inputType: "string",
  814. outputType: "string",
  815. args: [
  816. {
  817. name: "Internationalised domain name",
  818. type: "boolean",
  819. value: Punycode.IDN
  820. }
  821. ]
  822. },
  823. "To Punycode": {
  824. module: "Encodings",
  825. description: "Punycode is a way to represent Unicode with the limited character subset of ASCII supported by the Domain Name System.<br><br>e.g. <code>münchen</code> encodes to <code>mnchen-3ya</code>",
  826. inputType: "string",
  827. outputType: "string",
  828. args: [
  829. {
  830. name: "Internationalised domain name",
  831. type: "boolean",
  832. value: Punycode.IDN
  833. }
  834. ]
  835. },
  836. "From Hex Content": {
  837. module: "Default",
  838. description: "Translates hexadecimal bytes in text back to raw bytes.<br><br>e.g. <code>foo|3d|bar</code> becomes <code>foo=bar</code>.",
  839. inputType: "string",
  840. outputType: "byteArray",
  841. args: []
  842. },
  843. "To Hex Content": {
  844. module: "Default",
  845. description: "Converts special characters in a string to hexadecimal.<br><br>e.g. <code>foo=bar</code> becomes <code>foo|3d|bar</code>.",
  846. inputType: "byteArray",
  847. outputType: "string",
  848. args: [
  849. {
  850. name: "Convert",
  851. type: "option",
  852. value: ByteRepr.HEX_CONTENT_CONVERT_WHICH
  853. },
  854. {
  855. name: "Print spaces between bytes",
  856. type: "boolean",
  857. value: ByteRepr.HEX_CONTENT_SPACES_BETWEEN_BYTES
  858. },
  859. ]
  860. },
  861. "Change IP format": {
  862. module: "JSBN",
  863. description: "Convert an IP address from one format to another, e.g. <code>172.20.23.54</code> to <code>ac141736</code>",
  864. inputType: "string",
  865. outputType: "string",
  866. args: [
  867. {
  868. name: "Input format",
  869. type: "option",
  870. value: IP.IP_FORMAT_LIST
  871. },
  872. {
  873. name: "Output format",
  874. type: "option",
  875. value: IP.IP_FORMAT_LIST
  876. }
  877. ]
  878. },
  879. "Parse IP range": {
  880. module: "JSBN",
  881. description: "Given a CIDR range (e.g. <code>10.0.0.0/24</code>) or a hyphenated range (e.g. <code>10.0.0.0 - 10.0.1.0</code>), this operation provides network information and enumerates all IP addresses in the range.<br><br>IPv6 is supported but will not be enumerated.",
  882. inputType: "string",
  883. outputType: "string",
  884. args: [
  885. {
  886. name: "Include network info",
  887. type: "boolean",
  888. value: IP.INCLUDE_NETWORK_INFO
  889. },
  890. {
  891. name: "Enumerate IP addresses",
  892. type: "boolean",
  893. value: IP.ENUMERATE_ADDRESSES
  894. },
  895. {
  896. name: "Allow large queries",
  897. type: "boolean",
  898. value: IP.ALLOW_LARGE_LIST
  899. }
  900. ]
  901. },
  902. "Group IP addresses": {
  903. module: "JSBN",
  904. description: "Groups a list of IP addresses into subnets. Supports both IPv4 and IPv6 addresses.",
  905. inputType: "string",
  906. outputType: "string",
  907. args: [
  908. {
  909. name: "Delimiter",
  910. type: "option",
  911. value: IP.DELIM_OPTIONS
  912. },
  913. {
  914. name: "Subnet (CIDR)",
  915. type: "number",
  916. value: IP.GROUP_CIDR
  917. },
  918. {
  919. name: "Only show the subnets",
  920. type: "boolean",
  921. value: IP.GROUP_ONLY_SUBNET
  922. }
  923. ]
  924. },
  925. "Parse IPv6 address": {
  926. module: "JSBN",
  927. description: "Displays the longhand and shorthand versions of a valid IPv6 address.<br><br>Recognises all reserved ranges and parses encapsulated or tunnelled addresses including Teredo and 6to4.",
  928. inputType: "string",
  929. outputType: "string",
  930. args: []
  931. },
  932. "Parse IPv4 header": {
  933. module: "JSBN",
  934. description: "Given an IPv4 header, this operations parses and displays each field in an easily readable format.",
  935. inputType: "string",
  936. outputType: "html",
  937. args: [
  938. {
  939. name: "Input format",
  940. type: "option",
  941. value: IP.IP_HEADER_FORMAT
  942. }
  943. ]
  944. },
  945. "Encode text": {
  946. module: "CharEnc",
  947. description: [
  948. "Encodes text into the chosen character encoding.",
  949. "<br><br>",
  950. "Supported charsets are:",
  951. "<ul>",
  952. Object.keys(CharEnc.IO_FORMAT).map(e => `<li>${e}</li>`).join("\n"),
  953. "</ul>",
  954. ].join("\n"),
  955. inputType: "string",
  956. outputType: "byteArray",
  957. args: [
  958. {
  959. name: "Encoding",
  960. type: "option",
  961. value: Object.keys(CharEnc.IO_FORMAT),
  962. },
  963. ]
  964. },
  965. "Decode text": {
  966. module: "CharEnc",
  967. description: [
  968. "Decodes text from the chosen character encoding.",
  969. "<br><br>",
  970. "Supported charsets are:",
  971. "<ul>",
  972. Object.keys(CharEnc.IO_FORMAT).map(e => `<li>${e}</li>`).join("\n"),
  973. "</ul>",
  974. ].join("\n"),
  975. inputType: "byteArray",
  976. outputType: "string",
  977. args: [
  978. {
  979. name: "Encoding",
  980. type: "option",
  981. value: Object.keys(CharEnc.IO_FORMAT),
  982. },
  983. ]
  984. },
  985. "AES Decrypt": {
  986. module: "Ciphers",
  987. description: "To successfully decrypt AES, you need either:<ul><li>The passphrase</li><li>Or the key and IV</li></ul>The IV should be the first 16 bytes of encrypted material.",
  988. inputType: "string",
  989. outputType: "string",
  990. args: [
  991. {
  992. name: "Passphrase/Key",
  993. type: "toggleString",
  994. value: "",
  995. toggleValues: Cipher.IO_FORMAT2
  996. },
  997. {
  998. name: "IV",
  999. type: "toggleString",
  1000. value: "",
  1001. toggleValues: Cipher.IO_FORMAT1
  1002. },
  1003. {
  1004. name: "Salt",
  1005. type: "toggleString",
  1006. value: "",
  1007. toggleValues: Cipher.IO_FORMAT1
  1008. },
  1009. {
  1010. name: "Mode",
  1011. type: "option",
  1012. value: Cipher.MODES
  1013. },
  1014. {
  1015. name: "Padding",
  1016. type: "option",
  1017. value: Cipher.PADDING
  1018. },
  1019. {
  1020. name: "Input format",
  1021. type: "option",
  1022. value: Cipher.IO_FORMAT1
  1023. },
  1024. {
  1025. name: "Output format",
  1026. type: "option",
  1027. value: Cipher.IO_FORMAT2
  1028. },
  1029. ]
  1030. },
  1031. "AES Encrypt": {
  1032. module: "Ciphers",
  1033. description: "Input: Either enter a passphrase (which will be used to derive a key using the OpenSSL KDF) or both the key and IV.<br><br>Advanced Encryption Standard (AES) is a U.S. Federal Information Processing Standard (FIPS). It was selected after a 5-year process where 15 competing designs were evaluated.<br><br>AES-128, AES-192, and AES-256 are supported. The variant will be chosen based on the size of the key passed in. If a passphrase is used, a 256-bit key will be generated.",
  1034. inputType: "string",
  1035. outputType: "string",
  1036. args: [
  1037. {
  1038. name: "Passphrase/Key",
  1039. type: "toggleString",
  1040. value: "",
  1041. toggleValues: Cipher.IO_FORMAT2
  1042. },
  1043. {
  1044. name: "IV",
  1045. type: "toggleString",
  1046. value: "",
  1047. toggleValues: Cipher.IO_FORMAT1
  1048. },
  1049. {
  1050. name: "Salt",
  1051. type: "toggleString",
  1052. value: "",
  1053. toggleValues: Cipher.IO_FORMAT1
  1054. },
  1055. {
  1056. name: "Mode",
  1057. type: "option",
  1058. value: Cipher.MODES
  1059. },
  1060. {
  1061. name: "Padding",
  1062. type: "option",
  1063. value: Cipher.PADDING
  1064. },
  1065. {
  1066. name: "Output result",
  1067. type: "option",
  1068. value: Cipher.RESULT_TYPE
  1069. },
  1070. {
  1071. name: "Output format",
  1072. type: "option",
  1073. value: Cipher.IO_FORMAT1
  1074. },
  1075. ]
  1076. },
  1077. "DES Decrypt": {
  1078. module: "Ciphers",
  1079. description: "To successfully decrypt DES, you need either:<ul><li>The passphrase</li><li>Or the key and IV</li></ul>The IV should be the first 8 bytes of encrypted material.",
  1080. inputType: "string",
  1081. outputType: "string",
  1082. args: [
  1083. {
  1084. name: "Passphrase/Key",
  1085. type: "toggleString",
  1086. value: "",
  1087. toggleValues: Cipher.IO_FORMAT2
  1088. },
  1089. {
  1090. name: "IV",
  1091. type: "toggleString",
  1092. value: "",
  1093. toggleValues: Cipher.IO_FORMAT1
  1094. },
  1095. {
  1096. name: "Salt",
  1097. type: "toggleString",
  1098. value: "",
  1099. toggleValues: Cipher.IO_FORMAT1
  1100. },
  1101. {
  1102. name: "Mode",
  1103. type: "option",
  1104. value: Cipher.MODES
  1105. },
  1106. {
  1107. name: "Padding",
  1108. type: "option",
  1109. value: Cipher.PADDING
  1110. },
  1111. {
  1112. name: "Input format",
  1113. type: "option",
  1114. value: Cipher.IO_FORMAT1
  1115. },
  1116. {
  1117. name: "Output format",
  1118. type: "option",
  1119. value: Cipher.IO_FORMAT2
  1120. },
  1121. ]
  1122. },
  1123. "DES Encrypt": {
  1124. module: "Ciphers",
  1125. description: "Input: Either enter a passphrase (which will be used to derive a key using the OpenSSL KDF) or both the key and IV.<br><br>DES is a previously dominant algorithm for encryption, and was published as an official U.S. Federal Information Processing Standard (FIPS). It is now considered to be insecure due to its small key size.",
  1126. inputType: "string",
  1127. outputType: "string",
  1128. args: [
  1129. {
  1130. name: "Passphrase/Key",
  1131. type: "toggleString",
  1132. value: "",
  1133. toggleValues: Cipher.IO_FORMAT2
  1134. },
  1135. {
  1136. name: "IV",
  1137. type: "toggleString",
  1138. value: "",
  1139. toggleValues: Cipher.IO_FORMAT1
  1140. },
  1141. {
  1142. name: "Salt",
  1143. type: "toggleString",
  1144. value: "",
  1145. toggleValues: Cipher.IO_FORMAT1
  1146. },
  1147. {
  1148. name: "Mode",
  1149. type: "option",
  1150. value: Cipher.MODES
  1151. },
  1152. {
  1153. name: "Padding",
  1154. type: "option",
  1155. value: Cipher.PADDING
  1156. },
  1157. {
  1158. name: "Output result",
  1159. type: "option",
  1160. value: Cipher.RESULT_TYPE
  1161. },
  1162. {
  1163. name: "Output format",
  1164. type: "option",
  1165. value: Cipher.IO_FORMAT1
  1166. },
  1167. ]
  1168. },
  1169. "Triple DES Decrypt": {
  1170. module: "Ciphers",
  1171. description: "To successfully decrypt Triple DES, you need either:<ul><li>The passphrase</li><li>Or the key and IV</li></ul>The IV should be the first 8 bytes of encrypted material.",
  1172. inputType: "string",
  1173. outputType: "string",
  1174. args: [
  1175. {
  1176. name: "Passphrase/Key",
  1177. type: "toggleString",
  1178. value: "",
  1179. toggleValues: Cipher.IO_FORMAT2
  1180. },
  1181. {
  1182. name: "IV",
  1183. type: "toggleString",
  1184. value: "",
  1185. toggleValues: Cipher.IO_FORMAT1
  1186. },
  1187. {
  1188. name: "Salt",
  1189. type: "toggleString",
  1190. value: "",
  1191. toggleValues: Cipher.IO_FORMAT1
  1192. },
  1193. {
  1194. name: "Mode",
  1195. type: "option",
  1196. value: Cipher.MODES
  1197. },
  1198. {
  1199. name: "Padding",
  1200. type: "option",
  1201. value: Cipher.PADDING
  1202. },
  1203. {
  1204. name: "Input format",
  1205. type: "option",
  1206. value: Cipher.IO_FORMAT1
  1207. },
  1208. {
  1209. name: "Output format",
  1210. type: "option",
  1211. value: Cipher.IO_FORMAT2
  1212. },
  1213. ]
  1214. },
  1215. "Triple DES Encrypt": {
  1216. module: "Ciphers",
  1217. description: "Input: Either enter a passphrase (which will be used to derive a key using the OpenSSL KDF) or both the key and IV.<br><br>Triple DES applies DES three times to each block to increase key size.",
  1218. inputType: "string",
  1219. outputType: "string",
  1220. args: [
  1221. {
  1222. name: "Passphrase/Key",
  1223. type: "toggleString",
  1224. value: "",
  1225. toggleValues: Cipher.IO_FORMAT2
  1226. },
  1227. {
  1228. name: "IV",
  1229. type: "toggleString",
  1230. value: "",
  1231. toggleValues: Cipher.IO_FORMAT1
  1232. },
  1233. {
  1234. name: "Salt",
  1235. type: "toggleString",
  1236. value: "",
  1237. toggleValues: Cipher.IO_FORMAT1
  1238. },
  1239. {
  1240. name: "Mode",
  1241. type: "option",
  1242. value: Cipher.MODES
  1243. },
  1244. {
  1245. name: "Padding",
  1246. type: "option",
  1247. value: Cipher.PADDING
  1248. },
  1249. {
  1250. name: "Output result",
  1251. type: "option",
  1252. value: Cipher.RESULT_TYPE
  1253. },
  1254. {
  1255. name: "Output format",
  1256. type: "option",
  1257. value: Cipher.IO_FORMAT1
  1258. },
  1259. ]
  1260. },
  1261. "Blowfish Decrypt": {
  1262. module: "Ciphers",
  1263. description: "Blowfish is a symmetric-key block cipher designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products. AES now receives more attention.",
  1264. inputType: "string",
  1265. outputType: "string",
  1266. args: [
  1267. {
  1268. name: "Key",
  1269. type: "toggleString",
  1270. value: "",
  1271. toggleValues: Cipher.IO_FORMAT2
  1272. },
  1273. {
  1274. name: "Mode",
  1275. type: "option",
  1276. value: Cipher.BLOWFISH_MODES
  1277. },
  1278. {
  1279. name: "Input format",
  1280. type: "option",
  1281. value: Cipher.IO_FORMAT3
  1282. },
  1283. ]
  1284. },
  1285. "Blowfish Encrypt": {
  1286. module: "Ciphers",
  1287. description: "Blowfish is a symmetric-key block cipher designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products. AES now receives more attention.",
  1288. inputType: "string",
  1289. outputType: "string",
  1290. args: [
  1291. {
  1292. name: "Key",
  1293. type: "toggleString",
  1294. value: "",
  1295. toggleValues: Cipher.IO_FORMAT2
  1296. },
  1297. {
  1298. name: "Mode",
  1299. type: "option",
  1300. value: Cipher.BLOWFISH_MODES
  1301. },
  1302. {
  1303. name: "Output format",
  1304. type: "option",
  1305. value: Cipher.IO_FORMAT3
  1306. },
  1307. ]
  1308. },
  1309. "Rabbit Decrypt": {
  1310. module: "Ciphers",
  1311. description: "To successfully decrypt Rabbit, you need either:<ul><li>The passphrase</li><li>Or the key and IV (This is currently broken. You need the key and salt at the moment.)</li></ul>The IV should be the first 8 bytes of encrypted material.",
  1312. inputType: "string",
  1313. outputType: "string",
  1314. args: [
  1315. {
  1316. name: "Passphrase/Key",
  1317. type: "toggleString",
  1318. value: "",
  1319. toggleValues: Cipher.IO_FORMAT2
  1320. },
  1321. {
  1322. name: "IV",
  1323. type: "toggleString",
  1324. value: "",
  1325. toggleValues: Cipher.IO_FORMAT1
  1326. },
  1327. {
  1328. name: "Salt",
  1329. type: "toggleString",
  1330. value: "",
  1331. toggleValues: Cipher.IO_FORMAT1
  1332. },
  1333. {
  1334. name: "Mode",
  1335. type: "option",
  1336. value: Cipher.MODES
  1337. },
  1338. {
  1339. name: "Padding",
  1340. type: "option",
  1341. value: Cipher.PADDING
  1342. },
  1343. {
  1344. name: "Input format",
  1345. type: "option",
  1346. value: Cipher.IO_FORMAT1
  1347. },
  1348. {
  1349. name: "Output format",
  1350. type: "option",
  1351. value: Cipher.IO_FORMAT2
  1352. },
  1353. ]
  1354. },
  1355. "Rabbit Encrypt": {
  1356. module: "Ciphers",
  1357. description: "Input: Either enter a passphrase (which will be used to derive a key using the OpenSSL KDF) or both the key and IV.<br><br>Rabbit is a high-performance stream cipher and a finalist in the eSTREAM Portfolio. It is one of the four designs selected after a 3 1/2 year process where 22 designs were evaluated.",
  1358. inputType: "string",
  1359. outputType: "string",
  1360. args: [
  1361. {
  1362. name: "Passphrase/Key",
  1363. type: "toggleString",
  1364. value: "",
  1365. toggleValues: Cipher.IO_FORMAT2
  1366. },
  1367. {
  1368. name: "IV",
  1369. type: "toggleString",
  1370. value: "",
  1371. toggleValues: Cipher.IO_FORMAT1
  1372. },
  1373. {
  1374. name: "Salt",
  1375. type: "toggleString",
  1376. value: "",
  1377. toggleValues: Cipher.IO_FORMAT1
  1378. },
  1379. {
  1380. name: "Mode",
  1381. type: "option",
  1382. value: Cipher.MODES
  1383. },
  1384. {
  1385. name: "Padding",
  1386. type: "option",
  1387. value: Cipher.PADDING
  1388. },
  1389. {
  1390. name: "Output result",
  1391. type: "option",
  1392. value: Cipher.RESULT_TYPE
  1393. },
  1394. {
  1395. name: "Output format",
  1396. type: "option",
  1397. value: Cipher.IO_FORMAT1
  1398. },
  1399. ]
  1400. },
  1401. "RC4": {
  1402. module: "Ciphers",
  1403. description: "RC4 is a widely-used stream cipher. It is used in popular protocols such as SSL and WEP. Although remarkable for its simplicity and speed, the algorithm's history doesn't inspire confidence in its security.",
  1404. highlight: true,
  1405. highlightReverse: true,
  1406. inputType: "string",
  1407. outputType: "string",
  1408. args: [
  1409. {
  1410. name: "Passphrase",
  1411. type: "toggleString",
  1412. value: "",
  1413. toggleValues: Cipher.IO_FORMAT2
  1414. },
  1415. {
  1416. name: "Input format",
  1417. type: "option",
  1418. value: Cipher.IO_FORMAT4
  1419. },
  1420. {
  1421. name: "Output format",
  1422. type: "option",
  1423. value: Cipher.IO_FORMAT4
  1424. },
  1425. ]
  1426. },
  1427. "RC4 Drop": {
  1428. module: "Ciphers",
  1429. description: "It was discovered that the first few bytes of the RC4 keystream are strongly non-random and leak information about the key. We can defend against this attack by discarding the initial portion of the keystream. This modified algorithm is traditionally called RC4-drop.",
  1430. highlight: true,
  1431. highlightReverse: true,
  1432. inputType: "string",
  1433. outputType: "string",
  1434. args: [
  1435. {
  1436. name: "Passphrase",
  1437. type: "toggleString",
  1438. value: "",
  1439. toggleValues: Cipher.IO_FORMAT2
  1440. },
  1441. {
  1442. name: "Input format",
  1443. type: "option",
  1444. value: Cipher.IO_FORMAT4
  1445. },
  1446. {
  1447. name: "Output format",
  1448. type: "option",
  1449. value: Cipher.IO_FORMAT4
  1450. },
  1451. {
  1452. name: "Number of bytes to drop",
  1453. type: "number",
  1454. value: Cipher.RC4DROP_BYTES
  1455. },
  1456. ]
  1457. },
  1458. "Derive PBKDF2 key": {
  1459. module: "Ciphers",
  1460. description: "PBKDF2 is a password-based key derivation function. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required.<br><br>A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.<br><br>Enter your passphrase as the input and then set the relevant options to generate a key.",
  1461. inputType: "string",
  1462. outputType: "string",
  1463. args: [
  1464. {
  1465. name: "Key size",
  1466. type: "number",
  1467. value: Cipher.KDF_KEY_SIZE
  1468. },
  1469. {
  1470. name: "Iterations",
  1471. type: "number",
  1472. value: Cipher.KDF_ITERATIONS
  1473. },
  1474. {
  1475. name: "Hashing function",
  1476. type: "option",
  1477. value: Cipher.HASHERS
  1478. },
  1479. {
  1480. name: "Salt (hex)",
  1481. type: "string",
  1482. value: ""
  1483. },
  1484. {
  1485. name: "Input format",
  1486. type: "option",
  1487. value: Cipher.IO_FORMAT2
  1488. },
  1489. {
  1490. name: "Output format",
  1491. type: "option",
  1492. value: Cipher.IO_FORMAT3
  1493. },
  1494. ]
  1495. },
  1496. "Derive EVP key": {
  1497. module: "Ciphers",
  1498. description: "EVP is a password-based key derivation function used extensively in OpenSSL. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required.<br><br>A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.<br><br>Enter your passphrase as the input and then set the relevant options to generate a key.",
  1499. inputType: "string",
  1500. outputType: "string",
  1501. args: [
  1502. {
  1503. name: "Key size",
  1504. type: "number",
  1505. value: Cipher.KDF_KEY_SIZE
  1506. },
  1507. {
  1508. name: "Iterations",
  1509. type: "number",
  1510. value: Cipher.KDF_ITERATIONS
  1511. },
  1512. {
  1513. name: "Hashing function",
  1514. type: "option",
  1515. value: Cipher.HASHERS
  1516. },
  1517. {
  1518. name: "Salt (hex)",
  1519. type: "string",
  1520. value: ""
  1521. },
  1522. {
  1523. name: "Input format",
  1524. type: "option",
  1525. value: Cipher.IO_FORMAT2
  1526. },
  1527. {
  1528. name: "Output format",
  1529. type: "option",
  1530. value: Cipher.IO_FORMAT3
  1531. },
  1532. ]
  1533. },
  1534. "Vigenère Encode": {
  1535. module: "Ciphers",
  1536. description: "The Vigenere cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution.",
  1537. highlight: true,
  1538. highlightReverse: true,
  1539. inputType: "string",
  1540. outputType: "string",
  1541. args: [
  1542. {
  1543. name: "Key",
  1544. type: "string",
  1545. value: ""
  1546. }
  1547. ]
  1548. },
  1549. "Vigenère Decode": {
  1550. module: "Ciphers",
  1551. description: "The Vigenere cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution.",
  1552. highlight: true,
  1553. highlightReverse: true,
  1554. inputType: "string",
  1555. outputType: "string",
  1556. args: [
  1557. {
  1558. name: "Key",
  1559. type: "string",
  1560. value: ""
  1561. }
  1562. ]
  1563. },
  1564. "Bifid Cipher Encode": {
  1565. module: "Ciphers",
  1566. description: "The Bifid cipher is a cipher which uses a Polybius square in conjunction with transposition, which can be fairly difficult to decipher without knowing the alphabet keyword.",
  1567. highlight: true,
  1568. highlightReverse: true,
  1569. inputType: "string",
  1570. outputType: "string",
  1571. args: [
  1572. {
  1573. name: "Keyword",
  1574. type: "string",
  1575. value: ""
  1576. }
  1577. ]
  1578. },
  1579. "Bifid Cipher Decode": {
  1580. module: "Ciphers",
  1581. description: "The Bifid cipher is a cipher which uses a Polybius square in conjunction with transposition, which can be fairly difficult to decipher without knowing the alphabet keyword.",
  1582. highlight: true,
  1583. highlightReverse: true,
  1584. inputType: "string",
  1585. outputType: "string",
  1586. args: [
  1587. {
  1588. name: "Keyword",
  1589. type: "string",
  1590. value: ""
  1591. }
  1592. ]
  1593. },
  1594. "Affine Cipher Encode": {
  1595. module: "Ciphers",
  1596. description: "The Affine cipher is a type of monoalphabetic substitution cipher, wherein each letter in an alphabet is mapped to its numeric equivalent, encrypted using simple mathematical function, <code>(ax + b) % 26</code>, and converted back to a letter.",
  1597. highlight: true,
  1598. highlightReverse: true,
  1599. inputType: "string",
  1600. outputType: "string",
  1601. args: [
  1602. {
  1603. name: "a",
  1604. type: "number",
  1605. value: Cipher.AFFINE_A
  1606. },
  1607. {
  1608. name: "b",
  1609. type: "number",
  1610. value: Cipher.AFFINE_B
  1611. }
  1612. ]
  1613. },
  1614. "Affine Cipher Decode": {
  1615. module: "Ciphers",
  1616. 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.",
  1617. highlight: true,
  1618. highlightReverse: true,
  1619. inputType: "string",
  1620. outputType: "string",
  1621. args: [
  1622. {
  1623. name: "a",
  1624. type: "number",
  1625. value: Cipher.AFFINE_A
  1626. },
  1627. {
  1628. name: "b",
  1629. type: "number",
  1630. value: Cipher.AFFINE_B
  1631. }
  1632. ]
  1633. },
  1634. "Atbash Cipher": {
  1635. module: "Ciphers",
  1636. 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.",
  1637. highlight: true,
  1638. highlightReverse: true,
  1639. inputType: "string",
  1640. outputType: "string",
  1641. args: []
  1642. },
  1643. "Rotate right": {
  1644. module: "Default",
  1645. description: "Rotates each byte to the right by the number of bits specified, optionally carrying the excess bits over to the next byte. Currently only supports 8-bit values.",
  1646. highlight: true,
  1647. highlightReverse: true,
  1648. inputType: "byteArray",
  1649. outputType: "byteArray",
  1650. args: [
  1651. {
  1652. name: "Amount",
  1653. type: "number",
  1654. value: Rotate.ROTATE_AMOUNT
  1655. },
  1656. {
  1657. name: "Carry through",
  1658. type: "boolean",
  1659. value: Rotate.ROTATE_CARRY
  1660. }
  1661. ]
  1662. },
  1663. "Rotate left": {
  1664. module: "Default",
  1665. description: "Rotates each byte to the left by the number of bits specified, optionally carrying the excess bits over to the next byte. Currently only supports 8-bit values.",
  1666. highlight: true,
  1667. highlightReverse: true,
  1668. inputType: "byteArray",
  1669. outputType: "byteArray",
  1670. args: [
  1671. {
  1672. name: "Amount",
  1673. type: "number",
  1674. value: Rotate.ROTATE_AMOUNT
  1675. },
  1676. {
  1677. name: "Carry through",
  1678. type: "boolean",
  1679. value: Rotate.ROTATE_CARRY
  1680. }
  1681. ]
  1682. },
  1683. "ROT13": {
  1684. module: "Default",
  1685. description: "A simple caesar substitution cipher which rotates alphabet characters by the specified amount (default 13).",
  1686. highlight: true,
  1687. highlightReverse: true,
  1688. inputType: "byteArray",
  1689. outputType: "byteArray",
  1690. args: [
  1691. {
  1692. name: "Rotate lower case chars",
  1693. type: "boolean",
  1694. value: Rotate.ROT13_LOWERCASE
  1695. },
  1696. {
  1697. name: "Rotate upper case chars",
  1698. type: "boolean",
  1699. value: Rotate.ROT13_UPPERCASE
  1700. },
  1701. {
  1702. name: "Amount",
  1703. type: "number",
  1704. value: Rotate.ROT13_AMOUNT
  1705. },
  1706. ]
  1707. },
  1708. "ROT47": {
  1709. module: "Default",
  1710. description: "A slightly more complex variation of a caesar cipher, which includes ASCII characters from 33 '!' to 126 '~'. Default rotation: 47.",
  1711. highlight: true,
  1712. highlightReverse: true,
  1713. inputType: "byteArray",
  1714. outputType: "byteArray",
  1715. args: [
  1716. {
  1717. name: "Amount",
  1718. type: "number",
  1719. value: Rotate.ROT47_AMOUNT
  1720. },
  1721. ]
  1722. },
  1723. "Strip HTTP headers": {
  1724. module: "HTTP",
  1725. description: "Removes HTTP headers from a request or response by looking for the first instance of a double newline.",
  1726. inputType: "string",
  1727. outputType: "string",
  1728. args: []
  1729. },
  1730. "Parse User Agent": {
  1731. module: "HTTP",
  1732. description: "Attempts to identify and categorise information contained in a user-agent string.",
  1733. inputType: "string",
  1734. outputType: "string",
  1735. args: []
  1736. },
  1737. "Format MAC addresses": {
  1738. module: "Default",
  1739. description: "Displays given MAC addresses in multiple different formats.<br><br>Expects addresses in a list separated by newlines, spaces or commas.<br><br>WARNING: There are no validity checks.",
  1740. inputType: "string",
  1741. outputType: "string",
  1742. args: [
  1743. {
  1744. name: "Output case",
  1745. type: "option",
  1746. value: MAC.OUTPUT_CASE
  1747. },
  1748. {
  1749. name: "No delimiter",
  1750. type: "boolean",
  1751. value: MAC.NO_DELIM
  1752. },
  1753. {
  1754. name: "Dash delimiter",
  1755. type: "boolean",
  1756. value: MAC.DASH_DELIM
  1757. },
  1758. {
  1759. name: "Colon delimiter",
  1760. type: "boolean",
  1761. value: MAC.COLON_DELIM
  1762. },
  1763. {
  1764. name: "Cisco style",
  1765. type: "boolean",
  1766. value: MAC.CISCO_STYLE
  1767. }
  1768. ]
  1769. },
  1770. "Encode NetBIOS Name": {
  1771. module: "Default",
  1772. description: "NetBIOS names as seen across the client interface to NetBIOS are exactly 16 bytes long. Within the NetBIOS-over-TCP protocols, a longer representation is used.<br><br>There are two levels of encoding. The first level maps a NetBIOS name into a domain system name. The second level maps the domain system name into the 'compressed' representation required for interaction with the domain name system.<br><br>This operation carries out the first level of encoding. See RFC 1001 for full details.",
  1773. inputType: "byteArray",
  1774. outputType: "byteArray",
  1775. args: [
  1776. {
  1777. name: "Offset",
  1778. type: "number",
  1779. value: NetBIOS.OFFSET
  1780. }
  1781. ]
  1782. },
  1783. "Decode NetBIOS Name": {
  1784. module: "Default",
  1785. description: "NetBIOS names as seen across the client interface to NetBIOS are exactly 16 bytes long. Within the NetBIOS-over-TCP protocols, a longer representation is used.<br><br>There are two levels of encoding. The first level maps a NetBIOS name into a domain system name. The second level maps the domain system name into the 'compressed' representation required for interaction with the domain name system.<br><br>This operation decodes the first level of encoding. See RFC 1001 for full details.",
  1786. inputType: "byteArray",
  1787. outputType: "byteArray",
  1788. args: [
  1789. {
  1790. name: "Offset",
  1791. type: "number",
  1792. value: NetBIOS.OFFSET
  1793. }
  1794. ]
  1795. },
  1796. "Offset checker": {
  1797. module: "Default",
  1798. description: "Compares multiple inputs (separated by the specified delimiter) and highlights matching characters which appear at the same position in all samples.",
  1799. inputType: "string",
  1800. outputType: "html",
  1801. args: [
  1802. {
  1803. name: "Sample delimiter",
  1804. type: "binaryString",
  1805. value: StrUtils.OFF_CHK_SAMPLE_DELIMITER
  1806. }
  1807. ]
  1808. },
  1809. "Remove whitespace": {
  1810. module: "Default",
  1811. description: "Optionally removes all spaces, carriage returns, line feeds, tabs and form feeds from the input data.<br><br>This operation also supports the removal of full stops which are sometimes used to represent non-printable bytes in ASCII output.",
  1812. inputType: "string",
  1813. outputType: "string",
  1814. args: [
  1815. {
  1816. name: "Spaces",
  1817. type: "boolean",
  1818. value: Tidy.REMOVE_SPACES
  1819. },
  1820. {
  1821. name: "Carriage returns (\\r)",
  1822. type: "boolean",
  1823. value: Tidy.REMOVE_CARIAGE_RETURNS
  1824. },
  1825. {
  1826. name: "Line feeds (\\n)",
  1827. type: "boolean",
  1828. value: Tidy.REMOVE_LINE_FEEDS
  1829. },
  1830. {
  1831. name: "Tabs",
  1832. type: "boolean",
  1833. value: Tidy.REMOVE_TABS
  1834. },
  1835. {
  1836. name: "Form feeds (\\f)",
  1837. type: "boolean",
  1838. value: Tidy.REMOVE_FORM_FEEDS
  1839. },
  1840. {
  1841. name: "Full stops",
  1842. type: "boolean",
  1843. value: Tidy.REMOVE_FULL_STOPS
  1844. }
  1845. ]
  1846. },
  1847. "Remove null bytes": {
  1848. module: "Default",
  1849. description: "Removes all null bytes (<code>0x00</code>) from the input.",
  1850. inputType: "byteArray",
  1851. outputType: "byteArray",
  1852. args: []
  1853. },
  1854. "Drop bytes": {
  1855. module: "Default",
  1856. description: "Cuts the specified number of bytes out of the data.",
  1857. inputType: "byteArray",
  1858. outputType: "byteArray",
  1859. args: [
  1860. {
  1861. name: "Start",
  1862. type: "number",
  1863. value: Tidy.DROP_START
  1864. },
  1865. {
  1866. name: "Length",
  1867. type: "number",
  1868. value: Tidy.DROP_LENGTH
  1869. },
  1870. {
  1871. name: "Apply to each line",
  1872. type: "boolean",
  1873. value: Tidy.APPLY_TO_EACH_LINE
  1874. }
  1875. ]
  1876. },
  1877. "Take bytes": {
  1878. module: "Default",
  1879. description: "Takes a slice of the specified number of bytes from the data.",
  1880. inputType: "byteArray",
  1881. outputType: "byteArray",
  1882. args: [
  1883. {
  1884. name: "Start",
  1885. type: "number",
  1886. value: Tidy.TAKE_START
  1887. },
  1888. {
  1889. name: "Length",
  1890. type: "number",
  1891. value: Tidy.TAKE_LENGTH
  1892. },
  1893. {
  1894. name: "Apply to each line",
  1895. type: "boolean",
  1896. value: Tidy.APPLY_TO_EACH_LINE
  1897. }
  1898. ]
  1899. },
  1900. "Pad lines": {
  1901. module: "Default",
  1902. description: "Add the specified number of the specified character to the beginning or end of each line",
  1903. inputType: "string",
  1904. outputType: "string",
  1905. args: [
  1906. {
  1907. name: "Position",
  1908. type: "option",
  1909. value: Tidy.PAD_POSITION
  1910. },
  1911. {
  1912. name: "Length",
  1913. type: "number",
  1914. value: Tidy.PAD_LENGTH
  1915. },
  1916. {
  1917. name: "Character",
  1918. type: "binaryShortString",
  1919. value: Tidy.PAD_CHAR
  1920. }
  1921. ]
  1922. },
  1923. "Reverse": {
  1924. module: "Default",
  1925. description: "Reverses the input string.",
  1926. inputType: "byteArray",
  1927. outputType: "byteArray",
  1928. args: [
  1929. {
  1930. name: "By",
  1931. type: "option",
  1932. value: SeqUtils.REVERSE_BY
  1933. }
  1934. ]
  1935. },
  1936. "Sort": {
  1937. module: "Default",
  1938. description: "Alphabetically sorts strings separated by the specified delimiter.<br><br>The IP address option supports IPv4 only.",
  1939. inputType: "string",
  1940. outputType: "string",
  1941. args: [
  1942. {
  1943. name: "Delimiter",
  1944. type: "option",
  1945. value: SeqUtils.DELIMITER_OPTIONS
  1946. },
  1947. {
  1948. name: "Reverse",
  1949. type: "boolean",
  1950. value: SeqUtils.SORT_REVERSE
  1951. },
  1952. {
  1953. name: "Order",
  1954. type: "option",
  1955. value: SeqUtils.SORT_ORDER
  1956. }
  1957. ]
  1958. },
  1959. "Unique": {
  1960. module: "Default",
  1961. description: "Removes duplicate strings from the input.",
  1962. inputType: "string",
  1963. outputType: "string",
  1964. args: [
  1965. {
  1966. name: "Delimiter",
  1967. type: "option",
  1968. value: SeqUtils.DELIMITER_OPTIONS
  1969. }
  1970. ]
  1971. },
  1972. "Count occurrences": {
  1973. module: "Default",
  1974. description: "Counts the number of times the provided string occurs in the input.",
  1975. inputType: "string",
  1976. outputType: "number",
  1977. args: [
  1978. {
  1979. name: "Search string",
  1980. type: "toggleString",
  1981. value: "",
  1982. toggleValues: SeqUtils.SEARCH_TYPE
  1983. }
  1984. ]
  1985. },
  1986. "Add line numbers": {
  1987. module: "Default",
  1988. description: "Adds line numbers to the output.",
  1989. inputType: "string",
  1990. outputType: "string",
  1991. args: []
  1992. },
  1993. "Remove line numbers": {
  1994. module: "Default",
  1995. description: "Removes line numbers from the output if they can be trivially detected.",
  1996. inputType: "string",
  1997. outputType: "string",
  1998. args: []
  1999. },
  2000. "Find / Replace": {
  2001. module: "Default",
  2002. description: "Replaces all occurrences of the first string with the second.<br><br> Includes support for regular expressions (regex), simple strings and extended strings (which support \\n, \\r, \\t, \\b, \\f and escaped hex bytes using \\x notation, e.g. \\x00 for a null byte).",
  2003. manualBake: true,
  2004. inputType: "string",
  2005. outputType: "string",
  2006. args: [
  2007. {
  2008. name: "Find",
  2009. type: "toggleString",
  2010. value: "",
  2011. toggleValues: StrUtils.SEARCH_TYPE
  2012. },
  2013. {
  2014. name: "Replace",
  2015. type: "binaryString",
  2016. value: ""
  2017. },
  2018. {
  2019. name: "Global match",
  2020. type: "boolean",
  2021. value: StrUtils.FIND_REPLACE_GLOBAL,
  2022. },
  2023. {
  2024. name: "Case insensitive",
  2025. type: "boolean",
  2026. value: StrUtils.FIND_REPLACE_CASE,
  2027. },
  2028. {
  2029. name: "Multiline matching",
  2030. type: "boolean",
  2031. value: StrUtils.FIND_REPLACE_MULTILINE,
  2032. },
  2033. ]
  2034. },
  2035. "To Upper case": {
  2036. module: "Default",
  2037. description: "Converts the input string to upper case, optionally limiting scope to only the first character in each word, sentence or paragraph.",
  2038. highlight: true,
  2039. highlightReverse: true,
  2040. inputType: "string",
  2041. outputType: "string",
  2042. args: [
  2043. {
  2044. name: "Scope",
  2045. type: "option",
  2046. value: StrUtils.CASE_SCOPE
  2047. }
  2048. ]
  2049. },
  2050. "To Lower case": {
  2051. module: "Default",
  2052. description: "Converts every character in the input to lower case.",
  2053. highlight: true,
  2054. highlightReverse: true,
  2055. inputType: "string",
  2056. outputType: "string",
  2057. args: []
  2058. },
  2059. "Split": {
  2060. module: "Default",
  2061. description: "Splits a string into sections around a given delimiter.",
  2062. inputType: "string",
  2063. outputType: "string",
  2064. args: [
  2065. {
  2066. name: "Split delimiter",
  2067. type: "binaryShortString",
  2068. value: StrUtils.SPLIT_DELIM
  2069. },
  2070. {
  2071. name: "Join delimiter",
  2072. type: "option",
  2073. value: StrUtils.DELIMITER_OPTIONS
  2074. }
  2075. ]
  2076. },
  2077. "Filter": {
  2078. module: "Default",
  2079. description: "Splits up the input using the specified delimiter and then filters each branch based on a regular expression.",
  2080. manualBake: true,
  2081. inputType: "string",
  2082. outputType: "string",
  2083. args: [
  2084. {
  2085. name: "Delimiter",
  2086. type: "option",
  2087. value: StrUtils.DELIMITER_OPTIONS
  2088. },
  2089. {
  2090. name: "Regex",
  2091. type: "string",
  2092. value: ""
  2093. },
  2094. {
  2095. name: "Invert condition",
  2096. type: "boolean",
  2097. value: SeqUtils.SORT_REVERSE
  2098. },
  2099. ]
  2100. },
  2101. "Strings": {
  2102. module: "Default",
  2103. description: "Extracts all strings from the input.",
  2104. inputType: "string",
  2105. outputType: "string",
  2106. args: [
  2107. {
  2108. name: "Minimum length",
  2109. type: "number",
  2110. value: Extract.MIN_STRING_LEN
  2111. },
  2112. {
  2113. name: "Display total",
  2114. type: "boolean",
  2115. value: Extract.DISPLAY_TOTAL
  2116. }
  2117. ]
  2118. },
  2119. "Extract IP addresses": {
  2120. module: "Default",
  2121. description: "Extracts all IPv4 and IPv6 addresses.<br><br>Warning: Given a string <code>710.65.0.456</code>, this will match <code>10.65.0.45</code> so always check the original input!",
  2122. inputType: "string",
  2123. outputType: "string",
  2124. args: [
  2125. {
  2126. name: "IPv4",
  2127. type: "boolean",
  2128. value: Extract.INCLUDE_IPV4
  2129. },
  2130. {
  2131. name: "IPv6",
  2132. type: "boolean",
  2133. value: Extract.INCLUDE_IPV6
  2134. },
  2135. {
  2136. name: "Remove local IPv4 addresses",
  2137. type: "boolean",
  2138. value: Extract.REMOVE_LOCAL
  2139. },
  2140. {
  2141. name: "Display total",
  2142. type: "boolean",
  2143. value: Extract.DISPLAY_TOTAL
  2144. }
  2145. ]
  2146. },
  2147. "Extract email addresses": {
  2148. module: "Default",
  2149. description: "Extracts all email addresses from the input.",
  2150. inputType: "string",
  2151. outputType: "string",
  2152. args: [
  2153. {
  2154. name: "Display total",
  2155. type: "boolean",
  2156. value: Extract.DISPLAY_TOTAL
  2157. }
  2158. ]
  2159. },
  2160. "Extract MAC addresses": {
  2161. module: "Default",
  2162. description: "Extracts all Media Access Control (MAC) addresses from the input.",
  2163. inputType: "string",
  2164. outputType: "string",
  2165. args: [
  2166. {
  2167. name: "Display total",
  2168. type: "boolean",
  2169. value: Extract.DISPLAY_TOTAL
  2170. }
  2171. ]
  2172. },
  2173. "Extract URLs": {
  2174. module: "Default",
  2175. 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.",
  2176. inputType: "string",
  2177. outputType: "string",
  2178. args: [
  2179. {
  2180. name: "Display total",
  2181. type: "boolean",
  2182. value: Extract.DISPLAY_TOTAL
  2183. }
  2184. ]
  2185. },
  2186. "Extract domains": {
  2187. module: "Default",
  2188. description: "Extracts domain names.<br>Note that this will not include paths. Use <strong>Extract URLs</strong> to find entire URLs.",
  2189. inputType: "string",
  2190. outputType: "string",
  2191. args: [
  2192. {
  2193. name: "Display total",
  2194. type: "boolean",
  2195. value: Extract.DISPLAY_TOTAL
  2196. }
  2197. ]
  2198. },
  2199. "Extract file paths": {
  2200. module: "Default",
  2201. description: "Extracts anything that looks like a Windows or UNIX file path.<br><br>Note that if UNIX is selected, there will likely be a lot of false positives.",
  2202. inputType: "string",
  2203. outputType: "string",
  2204. args: [
  2205. {
  2206. name: "Windows",
  2207. type: "boolean",
  2208. value: Extract.INCLUDE_WIN_PATH
  2209. },
  2210. {
  2211. name: "UNIX",
  2212. type: "boolean",
  2213. value: Extract.INCLUDE_UNIX_PATH
  2214. },
  2215. {
  2216. name: "Display total",
  2217. type: "boolean",
  2218. value: Extract.DISPLAY_TOTAL
  2219. }
  2220. ]
  2221. },
  2222. "Extract dates": {
  2223. module: "Default",
  2224. description: "Extracts dates in the following formats<ul><li><code>yyyy-mm-dd</code></li><li><code>dd/mm/yyyy</code></li><li><code>mm/dd/yyyy</code></li></ul>Dividers can be any of /, -, . or space",
  2225. inputType: "string",
  2226. outputType: "string",
  2227. args: [
  2228. {
  2229. name: "Display total",
  2230. type: "boolean",
  2231. value: Extract.DISPLAY_TOTAL
  2232. }
  2233. ]
  2234. },
  2235. "Regular expression": {
  2236. module: "Default",
  2237. description: "Define your own regular expression (regex) to search the input data with, optionally choosing from a list of pre-defined patterns.",
  2238. manualBake: true,
  2239. inputType: "string",
  2240. outputType: "html",
  2241. args: [
  2242. {
  2243. name: "Built in regexes",
  2244. type: "populateOption",
  2245. value: StrUtils.REGEX_PRE_POPULATE,
  2246. target: 1,
  2247. },
  2248. {
  2249. name: "Regex",
  2250. type: "text",
  2251. value: ""
  2252. },
  2253. {
  2254. name: "Case insensitive",
  2255. type: "boolean",
  2256. value: StrUtils.REGEX_CASE_INSENSITIVE
  2257. },
  2258. {
  2259. name: "Multiline matching",
  2260. type: "boolean",
  2261. value: StrUtils.REGEX_MULTILINE_MATCHING
  2262. },
  2263. {
  2264. name: "Display total",
  2265. type: "boolean",
  2266. value: StrUtils.DISPLAY_TOTAL
  2267. },
  2268. {
  2269. name: "Output format",
  2270. type: "option",
  2271. value: StrUtils.OUTPUT_FORMAT
  2272. },
  2273. ]
  2274. },
  2275. "XPath expression": {
  2276. module: "Code",
  2277. description: "Extract information from an XML document with an XPath query",
  2278. inputType: "string",
  2279. outputType: "string",
  2280. args: [
  2281. {
  2282. name: "XPath",
  2283. type: "string",
  2284. value: Code.XPATH_INITIAL
  2285. },
  2286. {
  2287. name: "Result delimiter",
  2288. type: "binaryShortString",
  2289. value: Code.XPATH_DELIMITER
  2290. }
  2291. ]
  2292. },
  2293. "JPath expression": {
  2294. module: "Code",
  2295. description: "Extract information from a JSON object with a JPath query.",
  2296. inputType: "string",
  2297. outputType: "string",
  2298. args: [
  2299. {
  2300. name: "Query",
  2301. type: "string",
  2302. value: Code.JPATH_INITIAL
  2303. },
  2304. {
  2305. name: "Result delimiter",
  2306. type: "binaryShortString",
  2307. value: Code.JPATH_DELIMITER
  2308. }
  2309. ]
  2310. },
  2311. "CSS selector": {
  2312. module: "Code",
  2313. description: "Extract information from an HTML document with a CSS selector",
  2314. inputType: "string",
  2315. outputType: "string",
  2316. args: [
  2317. {
  2318. name: "CSS selector",
  2319. type: "string",
  2320. value: Code.CSS_SELECTOR_INITIAL
  2321. },
  2322. {
  2323. name: "Delimiter",
  2324. type: "binaryShortString",
  2325. value: Code.CSS_QUERY_DELIMITER
  2326. },
  2327. ]
  2328. },
  2329. "From UNIX Timestamp": {
  2330. module: "Default",
  2331. description: "Converts a UNIX timestamp to a datetime string.<br><br>e.g. <code>978346800</code> becomes <code>Mon 1 January 2001 11:00:00 UTC</code><br><br>A UNIX timestamp is a 32-bit value representing the number of seconds since January 1, 1970 UTC (the UNIX epoch).",
  2332. inputType: "number",
  2333. outputType: "string",
  2334. args: [
  2335. {
  2336. name: "Units",
  2337. type: "option",
  2338. value: DateTime.UNITS
  2339. }
  2340. ]
  2341. },
  2342. "To UNIX Timestamp": {
  2343. module: "Default",
  2344. description: "Parses a datetime string in UTC and returns the corresponding UNIX timestamp.<br><br>e.g. <code>Mon 1 January 2001 11:00:00</code> becomes <code>978346800</code><br><br>A UNIX timestamp is a 32-bit value representing the number of seconds since January 1, 1970 UTC (the UNIX epoch).",
  2345. inputType: "string",
  2346. outputType: "number",
  2347. args: [
  2348. {
  2349. name: "Units",
  2350. type: "option",
  2351. value: DateTime.UNITS
  2352. },
  2353. {
  2354. name: "Treat as UTC",
  2355. type: "boolean",
  2356. value: DateTime.TREAT_AS_UTC
  2357. }
  2358. ]
  2359. },
  2360. "Windows Filetime to UNIX Timestamp": {
  2361. module: "JSBN",
  2362. description: "Converts a Windows Filetime value to a UNIX timestamp.<br><br>A Windows Filetime is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 UTC.<br><br>A UNIX timestamp is a 32-bit value representing the number of seconds since January 1, 1970 UTC (the UNIX epoch).<br><br>This operation also supports UNIX timestamps in milliseconds, microseconds and nanoseconds.",
  2363. inputType: "string",
  2364. outputType: "string",
  2365. args: [
  2366. {
  2367. name: "Output units",
  2368. type: "option",
  2369. value: Filetime.UNITS
  2370. },
  2371. {
  2372. name: "Input format",
  2373. type: "option",
  2374. value: Filetime.FILETIME_FORMATS
  2375. }
  2376. ]
  2377. },
  2378. "UNIX Timestamp to Windows Filetime": {
  2379. module: "JSBN",
  2380. description: "Converts a UNIX timestamp to a Windows Filetime value.<br><br>A Windows Filetime is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 UTC.<br><br>A UNIX timestamp is a 32-bit value representing the number of seconds since January 1, 1970 UTC (the UNIX epoch).<br><br>This operation also supports UNIX timestamps in milliseconds, microseconds and nanoseconds.",
  2381. inputType: "string",
  2382. outputType: "string",
  2383. args: [
  2384. {
  2385. name: "Input units",
  2386. type: "option",
  2387. value: Filetime.UNITS
  2388. },
  2389. {
  2390. name: "Output format",
  2391. type: "option",
  2392. value: Filetime.FILETIME_FORMATS
  2393. }
  2394. ]
  2395. },
  2396. "Translate DateTime Format": {
  2397. module: "Default",
  2398. description: "Parses a datetime string in one format and re-writes it in another.<br><br>Run with no input to see the relevant format string examples.",
  2399. inputType: "string",
  2400. outputType: "html",
  2401. args: [
  2402. {
  2403. name: "Built in formats",
  2404. type: "populateOption",
  2405. value: DateTime.DATETIME_FORMATS,
  2406. target: 1
  2407. },
  2408. {
  2409. name: "Input format string",
  2410. type: "binaryString",
  2411. value: DateTime.INPUT_FORMAT_STRING
  2412. },
  2413. {
  2414. name: "Input timezone",
  2415. type: "option",
  2416. value: DateTime.TIMEZONES
  2417. },
  2418. {
  2419. name: "Output format string",
  2420. type: "binaryString",
  2421. value: DateTime.OUTPUT_FORMAT_STRING
  2422. },
  2423. {
  2424. name: "Output timezone",
  2425. type: "option",
  2426. value: DateTime.TIMEZONES
  2427. }
  2428. ]
  2429. },
  2430. "Parse DateTime": {
  2431. module: "Default",
  2432. description: "Parses a DateTime string in your specified format and displays it in whichever timezone you choose with the following information:<ul><li>Date</li><li>Time</li><li>Period (AM/PM)</li><li>Timezone</li><li>UTC offset</li><li>Daylight Saving Time</li><li>Leap year</li><li>Days in this month</li><li>Day of year</li><li>Week number</li><li>Quarter</li></ul>Run with no input to see format string examples if required.",
  2433. inputType: "string",
  2434. outputType: "html",
  2435. args: [
  2436. {
  2437. name: "Built in formats",
  2438. type: "populateOption",
  2439. value: DateTime.DATETIME_FORMATS,
  2440. target: 1
  2441. },
  2442. {
  2443. name: "Input format string",
  2444. type: "binaryString",
  2445. value: DateTime.INPUT_FORMAT_STRING
  2446. },
  2447. {
  2448. name: "Input timezone",
  2449. type: "option",
  2450. value: DateTime.TIMEZONES
  2451. },
  2452. ]
  2453. },
  2454. "Convert distance": {
  2455. module: "Default",
  2456. description: "Converts a unit of distance to another format.",
  2457. inputType: "number",
  2458. outputType: "number",
  2459. args: [
  2460. {
  2461. name: "Input units",
  2462. type: "option",
  2463. value: Convert.DISTANCE_UNITS
  2464. },
  2465. {
  2466. name: "Output units",
  2467. type: "option",
  2468. value: Convert.DISTANCE_UNITS
  2469. }
  2470. ]
  2471. },
  2472. "Convert area": {
  2473. module: "Default",
  2474. description: "Converts a unit of area to another format.",
  2475. inputType: "number",
  2476. outputType: "number",
  2477. args: [
  2478. {
  2479. name: "Input units",
  2480. type: "option",
  2481. value: Convert.AREA_UNITS
  2482. },
  2483. {
  2484. name: "Output units",
  2485. type: "option",
  2486. value: Convert.AREA_UNITS
  2487. }
  2488. ]
  2489. },
  2490. "Convert mass": {
  2491. module: "Default",
  2492. description: "Converts a unit of mass to another format.",
  2493. inputType: "number",
  2494. outputType: "number",
  2495. args: [
  2496. {
  2497. name: "Input units",
  2498. type: "option",
  2499. value: Convert.MASS_UNITS
  2500. },
  2501. {
  2502. name: "Output units",
  2503. type: "option",
  2504. value: Convert.MASS_UNITS
  2505. }
  2506. ]
  2507. },
  2508. "Convert speed": {
  2509. module: "Default",
  2510. description: "Converts a unit of speed to another format.",
  2511. inputType: "number",
  2512. outputType: "number",
  2513. args: [
  2514. {
  2515. name: "Input units",
  2516. type: "option",
  2517. value: Convert.SPEED_UNITS
  2518. },
  2519. {
  2520. name: "Output units",
  2521. type: "option",
  2522. value: Convert.SPEED_UNITS
  2523. }
  2524. ]
  2525. },
  2526. "Convert data units": {
  2527. module: "Default",
  2528. description: "Converts a unit of data to another format.",
  2529. inputType: "number",
  2530. outputType: "number",
  2531. args: [
  2532. {
  2533. name: "Input units",
  2534. type: "option",
  2535. value: Convert.DATA_UNITS
  2536. },
  2537. {
  2538. name: "Output units",
  2539. type: "option",
  2540. value: Convert.DATA_UNITS
  2541. }
  2542. ]
  2543. },
  2544. "Raw Deflate": {
  2545. module: "Compression",
  2546. description: "Compresses data using the deflate algorithm with no headers.",
  2547. inputType: "byteArray",
  2548. outputType: "byteArray",
  2549. args: [
  2550. {
  2551. name: "Compression type",
  2552. type: "option",
  2553. value: Compress.COMPRESSION_TYPE
  2554. }
  2555. ]
  2556. },
  2557. "Raw Inflate": {
  2558. module: "Compression",
  2559. description: "Decompresses data which has been compressed using the deflate algorithm with no headers.",
  2560. inputType: "byteArray",
  2561. outputType: "byteArray",
  2562. args: [
  2563. {
  2564. name: "Start index",
  2565. type: "number",
  2566. value: Compress.INFLATE_INDEX
  2567. },
  2568. {
  2569. name: "Initial output buffer size",
  2570. type: "number",
  2571. value: Compress.INFLATE_BUFFER_SIZE
  2572. },
  2573. {
  2574. name: "Buffer expansion type",
  2575. type: "option",
  2576. value: Compress.INFLATE_BUFFER_TYPE
  2577. },
  2578. {
  2579. name: "Resize buffer after decompression",
  2580. type: "boolean",
  2581. value: Compress.INFLATE_RESIZE
  2582. },
  2583. {
  2584. name: "Verify result",
  2585. type: "boolean",
  2586. value: Compress.INFLATE_VERIFY
  2587. }
  2588. ]
  2589. },
  2590. "Zlib Deflate": {
  2591. module: "Compression",
  2592. description: "Compresses data using the deflate algorithm adding zlib headers.",
  2593. inputType: "byteArray",
  2594. outputType: "byteArray",
  2595. args: [
  2596. {
  2597. name: "Compression type",
  2598. type: "option",
  2599. value: Compress.COMPRESSION_TYPE
  2600. }
  2601. ]
  2602. },
  2603. "Zlib Inflate": {
  2604. module: "Compression",
  2605. description: "Decompresses data which has been compressed using the deflate algorithm with zlib headers.",
  2606. inputType: "byteArray",
  2607. outputType: "byteArray",
  2608. args: [
  2609. {
  2610. name: "Start index",
  2611. type: "number",
  2612. value: Compress.INFLATE_INDEX
  2613. },
  2614. {
  2615. name: "Initial output buffer size",
  2616. type: "number",
  2617. value: Compress.INFLATE_BUFFER_SIZE
  2618. },
  2619. {
  2620. name: "Buffer expansion type",
  2621. type: "option",
  2622. value: Compress.INFLATE_BUFFER_TYPE
  2623. },
  2624. {
  2625. name: "Resize buffer after decompression",
  2626. type: "boolean",
  2627. value: Compress.INFLATE_RESIZE
  2628. },
  2629. {
  2630. name: "Verify result",
  2631. type: "boolean",
  2632. value: Compress.INFLATE_VERIFY
  2633. }
  2634. ]
  2635. },
  2636. "Gzip": {
  2637. module: "Compression",
  2638. description: "Compresses data using the deflate algorithm with gzip headers.",
  2639. inputType: "byteArray",
  2640. outputType: "byteArray",
  2641. args: [
  2642. {
  2643. name: "Compression type",
  2644. type: "option",
  2645. value: Compress.COMPRESSION_TYPE
  2646. },
  2647. {
  2648. name: "Filename (optional)",
  2649. type: "string",
  2650. value: ""
  2651. },
  2652. {
  2653. name: "Comment (optional)",
  2654. type: "string",
  2655. value: ""
  2656. },
  2657. {
  2658. name: "Include file checksum",
  2659. type: "boolean",
  2660. value: Compress.GZIP_CHECKSUM
  2661. }
  2662. ]
  2663. },
  2664. "Gunzip": {
  2665. module: "Compression",
  2666. description: "Decompresses data which has been compressed using the deflate algorithm with gzip headers.",
  2667. inputType: "byteArray",
  2668. outputType: "byteArray",
  2669. args: []
  2670. },
  2671. "Zip": {
  2672. module: "Compression",
  2673. description: "Compresses data using the PKZIP algorithm with the given filename.<br><br>No support for multiple files at this time.",
  2674. inputType: "byteArray",
  2675. outputType: "byteArray",
  2676. args: [
  2677. {
  2678. name: "Filename",
  2679. type: "string",
  2680. value: Compress.PKZIP_FILENAME
  2681. },
  2682. {
  2683. name: "Comment",
  2684. type: "string",
  2685. value: ""
  2686. },
  2687. {
  2688. name: "Password",
  2689. type: "binaryString",
  2690. value: ""
  2691. },
  2692. {
  2693. name: "Compression method",
  2694. type: "option",
  2695. value: Compress.COMPRESSION_METHOD
  2696. },
  2697. {
  2698. name: "Operating system",
  2699. type: "option",
  2700. value: Compress.OS
  2701. },
  2702. {
  2703. name: "Compression type",
  2704. type: "option",
  2705. value: Compress.COMPRESSION_TYPE
  2706. }
  2707. ]
  2708. },
  2709. "Unzip": {
  2710. module: "Compression",
  2711. description: "Decompresses data using the PKZIP algorithm and displays it per file, with support for passwords.",
  2712. inputType: "byteArray",
  2713. outputType: "html",
  2714. args: [
  2715. {
  2716. name: "Password",
  2717. type: "binaryString",
  2718. value: ""
  2719. },
  2720. {
  2721. name: "Verify result",
  2722. type: "boolean",
  2723. value: Compress.PKUNZIP_VERIFY
  2724. }
  2725. ]
  2726. },
  2727. "Bzip2 Decompress": {
  2728. module: "Compression",
  2729. description: "Decompresses data using the Bzip2 algorithm.",
  2730. inputType: "byteArray",
  2731. outputType: "string",
  2732. args: []
  2733. },
  2734. "Generic Code Beautify": {
  2735. module: "Code",
  2736. description: "Attempts to pretty print C-style languages such as C, C++, C#, Java, PHP, JavaScript etc.<br><br>This will not do a perfect job, and the resulting code may not work any more. This operation is designed purely to make obfuscated or minified code more easy to read and understand.<br><br>Things which will not work properly:<ul><li>For loop formatting</li><li>Do-While loop formatting</li><li>Switch/Case indentation</li><li>Certain bit shift operators</li></ul>",
  2737. inputType: "string",
  2738. outputType: "string",
  2739. args: []
  2740. },
  2741. "JavaScript Parser": {
  2742. module: "Code",
  2743. description: "Returns an Abstract Syntax Tree for valid JavaScript code.",
  2744. inputType: "string",
  2745. outputType: "string",
  2746. args: [
  2747. {
  2748. name: "Location info",
  2749. type: "boolean",
  2750. value: JS.PARSE_LOC
  2751. },
  2752. {
  2753. name: "Range info",
  2754. type: "boolean",
  2755. value: JS.PARSE_RANGE
  2756. },
  2757. {
  2758. name: "Include tokens array",
  2759. type: "boolean",
  2760. value: JS.PARSE_TOKENS
  2761. },
  2762. {
  2763. name: "Include comments array",
  2764. type: "boolean",
  2765. value: JS.PARSE_COMMENT
  2766. },
  2767. {
  2768. name: "Report errors and try to continue",
  2769. type: "boolean",
  2770. value: JS.PARSE_TOLERANT
  2771. },
  2772. ]
  2773. },
  2774. "JavaScript Beautify": {
  2775. module: "Code",
  2776. description: "Parses and pretty prints valid JavaScript code. Also works with JavaScript Object Notation (JSON).",
  2777. inputType: "string",
  2778. outputType: "string",
  2779. args: [
  2780. {
  2781. name: "Indent string",
  2782. type: "binaryShortString",
  2783. value: JS.BEAUTIFY_INDENT
  2784. },
  2785. {
  2786. name: "Quotes",
  2787. type: "option",
  2788. value: JS.BEAUTIFY_QUOTES
  2789. },
  2790. {
  2791. name: "Semicolons before closing braces",
  2792. type: "boolean",
  2793. value: JS.BEAUTIFY_SEMICOLONS
  2794. },
  2795. {
  2796. name: "Include comments",
  2797. type: "boolean",
  2798. value: JS.BEAUTIFY_COMMENT
  2799. },
  2800. ]
  2801. },
  2802. "JavaScript Minify": {
  2803. module: "Code",
  2804. description: "Compresses JavaScript code.",
  2805. inputType: "string",
  2806. outputType: "string",
  2807. args: []
  2808. },
  2809. "XML Beautify": {
  2810. module: "Code",
  2811. description: "Indents and prettifies eXtensible Markup Language (XML) code.",
  2812. inputType: "string",
  2813. outputType: "string",
  2814. args: [
  2815. {
  2816. name: "Indent string",
  2817. type: "binaryShortString",
  2818. value: Code.BEAUTIFY_INDENT
  2819. }
  2820. ]
  2821. },
  2822. "JSON Beautify": {
  2823. module: "Code",
  2824. description: "Indents and prettifies JavaScript Object Notation (JSON) code.",
  2825. inputType: "string",
  2826. outputType: "string",
  2827. args: [
  2828. {
  2829. name: "Indent string",
  2830. type: "binaryShortString",
  2831. value: Code.BEAUTIFY_INDENT
  2832. }
  2833. ]
  2834. },
  2835. "CSS Beautify": {
  2836. module: "Code",
  2837. description: "Indents and prettifies Cascading Style Sheets (CSS) code.",
  2838. inputType: "string",
  2839. outputType: "string",
  2840. args: [
  2841. {
  2842. name: "Indent string",
  2843. type: "binaryShortString",
  2844. value: Code.BEAUTIFY_INDENT
  2845. }
  2846. ]
  2847. },
  2848. "SQL Beautify": {
  2849. module: "Code",
  2850. description: "Indents and prettifies Structured Query Language (SQL) code.",
  2851. inputType: "string",
  2852. outputType: "string",
  2853. args: [
  2854. {
  2855. name: "Indent string",
  2856. type: "binaryShortString",
  2857. value: Code.BEAUTIFY_INDENT
  2858. }
  2859. ]
  2860. },
  2861. "XML Minify": {
  2862. module: "Code",
  2863. description: "Compresses eXtensible Markup Language (XML) code.",
  2864. inputType: "string",
  2865. outputType: "string",
  2866. args: [
  2867. {
  2868. name: "Preserve comments",
  2869. type: "boolean",
  2870. value: Code.PRESERVE_COMMENTS
  2871. }
  2872. ]
  2873. },
  2874. "JSON Minify": {
  2875. module: "Code",
  2876. description: "Compresses JavaScript Object Notation (JSON) code.",
  2877. inputType: "string",
  2878. outputType: "string",
  2879. args: []
  2880. },
  2881. "CSS Minify": {
  2882. module: "Code",
  2883. description: "Compresses Cascading Style Sheets (CSS) code.",
  2884. inputType: "string",
  2885. outputType: "string",
  2886. args: [
  2887. {
  2888. name: "Preserve comments",
  2889. type: "boolean",
  2890. value: Code.PRESERVE_COMMENTS
  2891. }
  2892. ]
  2893. },
  2894. "SQL Minify": {
  2895. module: "Code",
  2896. description: "Compresses Structured Query Language (SQL) code.",
  2897. inputType: "string",
  2898. outputType: "string",
  2899. args: []
  2900. },
  2901. "Analyse hash": {
  2902. module: "Hashing",
  2903. description: "Tries to determine information about a given hash and suggests which algorithm may have been used to generate it based on its length.",
  2904. inputType: "string",
  2905. outputType: "string",
  2906. args: []
  2907. },
  2908. "MD2": {
  2909. module: "Hashing",
  2910. description: "The MD2 (Message-Digest 2) algorithm is a cryptographic hash function developed by Ronald Rivest in 1989. The algorithm is optimized for 8-bit computers.<br><br>Although MD2 is no longer considered secure, even as of 2014, it remains in use in public key infrastructures as part of certificates generated with MD2 and RSA.",
  2911. inputType: "string",
  2912. outputType: "string",
  2913. args: []
  2914. },
  2915. "MD4": {
  2916. module: "Hashing",
  2917. description: "The MD4 (Message-Digest 4) algorithm is a cryptographic hash function developed by Ronald Rivest in 1990. The digest length is 128 bits. The algorithm has influenced later designs, such as the MD5, SHA-1 and RIPEMD algorithms.<br><br>The security of MD4 has been severely compromised.",
  2918. inputType: "string",
  2919. outputType: "string",
  2920. args: []
  2921. },
  2922. "MD5": {
  2923. module: "Hashing",
  2924. description: "MD5 (Message-Digest 5) is a widely used hash function. It has been used in a variety of security applications and is also commonly used to check the integrity of files.<br><br>However, MD5 is not collision resistant and it isn't suitable for applications like SSL/TLS certificates or digital signatures that rely on this property.",
  2925. inputType: "string",
  2926. outputType: "string",
  2927. args: []
  2928. },
  2929. "MD6": {
  2930. module: "Hashing",
  2931. description: "The MD6 (Message-Digest 6) algorithm is a cryptographic hash function. It uses a Merkle tree-like structure to allow for immense parallel computation of hashes for very long inputs.",
  2932. inputType: "string",
  2933. outputType: "string",
  2934. args: [
  2935. {
  2936. name: "Size",
  2937. type: "number",
  2938. value: Hash.MD6_SIZE
  2939. },
  2940. {
  2941. name: "Levels",
  2942. type: "number",
  2943. value: Hash.MD6_LEVELS
  2944. },
  2945. {
  2946. name: "Key",
  2947. type: "string",
  2948. value: ""
  2949. }
  2950. ]
  2951. },
  2952. "SHA0": {
  2953. module: "Hashing",
  2954. description: "SHA-0 is a retronym applied to the original version of the 160-bit hash function published in 1993 under the name 'SHA'. It was withdrawn shortly after publication due to an undisclosed 'significant flaw' and replaced by the slightly revised version SHA-1.",
  2955. inputType: "string",
  2956. outputType: "string",
  2957. args: []
  2958. },
  2959. "SHA1": {
  2960. module: "Hashing",
  2961. description: "The SHA (Secure Hash Algorithm) hash functions were designed by the NSA. SHA-1 is the most established of the existing SHA hash functions and it is used in a variety of security applications and protocols.<br><br>However, SHA-1's collision resistance has been weakening as new attacks are discovered or improved.",
  2962. inputType: "string",
  2963. outputType: "string",
  2964. args: []
  2965. },
  2966. "SHA2": {
  2967. module: "Hashing",
  2968. description: "The SHA-2 (Secure Hash Algorithm 2) hash functions were designed by the NSA. SHA-2 includes significant changes from its predecessor, SHA-1. The SHA-2 family consists of hash functions with digests (hash values) that are 224, 256, 384 or 512 bits: SHA224, SHA256, SHA384, SHA512.<br><br><ul><li>SHA-512 operates on 64-bit words.</li><li>SHA-256 operates on 32-bit words.</li><li>SHA-384 is largely identical to SHA-512 but is truncated to 384 bytes.</li><li>SHA-224 is largely identical to SHA-256 but is truncated to 224 bytes.</li><li>SHA-512/224 and SHA-512/256 are truncated versions of SHA-512, but the initial values are generated using the method described in Federal Information Processing Standards (FIPS) PUB 180-4.</li></ul>",
  2969. inputType: "string",
  2970. outputType: "string",
  2971. args: [
  2972. {
  2973. name: "Size",
  2974. type: "option",
  2975. value: Hash.SHA2_SIZE
  2976. }
  2977. ]
  2978. },
  2979. "SHA3": {
  2980. module: "Hashing",
  2981. description: "The SHA-3 (Secure Hash Algorithm 3) hash functions were released by NIST on August 5, 2015. Although part of the same series of standards, SHA-3 is internally quite different from the MD5-like structure of SHA-1 and SHA-2.<br><br>SHA-3 is a subset of the broader cryptographic primitive family Keccak designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún.",
  2982. inputType: "string",
  2983. outputType: "string",
  2984. args: [
  2985. {
  2986. name: "Size",
  2987. type: "option",
  2988. value: Hash.SHA3_SIZE
  2989. }
  2990. ]
  2991. },
  2992. "Keccak": {
  2993. module: "Hashing",
  2994. description: "The Keccak hash algorithm was designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún. It was selected as the winner of the SHA-3 design competition.<br><br>This version of the algorithm is Keccak[c=2d] and differs from the SHA-3 specification.",
  2995. inputType: "string",
  2996. outputType: "string",
  2997. args: [
  2998. {
  2999. name: "Size",
  3000. type: "option",
  3001. value: Hash.KECCAK_SIZE
  3002. }
  3003. ]
  3004. },
  3005. "Shake": {
  3006. module: "Hashing",
  3007. description: "Shake is an Extendable Output Function (XOF) of the SHA-3 hash algorithm, part of the Keccak family, allowing for variable output length/size.",
  3008. inputType: "string",
  3009. outputType: "string",
  3010. args: [
  3011. {
  3012. name: "Capacity",
  3013. type: "option",
  3014. value: Hash.SHAKE_CAPACITY
  3015. },
  3016. {
  3017. name: "Size",
  3018. type: "number",
  3019. value: Hash.SHAKE_SIZE
  3020. }
  3021. ]
  3022. },
  3023. "RIPEMD": {
  3024. module: "Hashing",
  3025. description: "RIPEMD (RACE Integrity Primitives Evaluation Message Digest) is a family of cryptographic hash functions developed in Leuven, Belgium, by Hans Dobbertin, Antoon Bosselaers and Bart Preneel at the COSIC research group at the Katholieke Universiteit Leuven, and first published in 1996.<br><br>RIPEMD was based upon the design principles used in MD4, and is similar in performance to the more popular SHA-1.<br><br>",
  3026. inputType: "string",
  3027. outputType: "string",
  3028. args: [
  3029. {
  3030. name: "Size",
  3031. type: "option",
  3032. value: Hash.RIPEMD_SIZE
  3033. }
  3034. ]
  3035. },
  3036. "HAS-160": {
  3037. module: "Hashing",
  3038. description: "HAS-160 is a cryptographic hash function designed for use with the Korean KCDSA digital signature algorithm. It is derived from SHA-1, with assorted changes intended to increase its security. It produces a 160-bit output.<br><br>HAS-160 is used in the same way as SHA-1. First it divides input in blocks of 512 bits each and pads the final block. A digest function updates the intermediate hash value by processing the input blocks in turn.<br><br>The message digest algorithm consists of 80 rounds.",
  3039. inputType: "string",
  3040. outputType: "string",
  3041. args: []
  3042. },
  3043. "Whirlpool": {
  3044. module: "Hashing",
  3045. description: "Whirlpool is a cryptographic hash function designed by Vincent Rijmen (co-creator of AES) and Paulo S. L. M. Barreto, who first described it in 2000.<br><br>Several variants exist:<ul><li>Whirlpool-0 is the original version released in 2000.</li><li>Whirlpool-T is the first revision, released in 2001, improving the generation of the s-box.</li><li>Wirlpool is the latest revision, released in 2003, fixing a flaw in the difusion matrix.</li></ul>",
  3046. inputType: "string",
  3047. outputType: "string",
  3048. args: [
  3049. {
  3050. name: "Variant",
  3051. type: "option",
  3052. value: Hash.WHIRLPOOL_VARIANT
  3053. }
  3054. ]
  3055. },
  3056. "Snefru": {
  3057. module: "Hashing",
  3058. description: "Snefru is a cryptographic hash function invented by Ralph Merkle in 1990 while working at Xerox PARC. The function supports 128-bit and 256-bit output. It was named after the Egyptian Pharaoh Sneferu, continuing the tradition of the Khufu and Khafre block ciphers.<br><br>The original design of Snefru was shown to be insecure by Eli Biham and Adi Shamir who were able to use differential cryptanalysis to find hash collisions. The design was then modified by increasing the number of iterations of the main pass of the algorithm from two to eight.",
  3059. inputType: "string",
  3060. outputType: "string",
  3061. args: [
  3062. {
  3063. name: "Rounds",
  3064. type: "option",
  3065. value: Hash.SNEFRU_ROUNDS
  3066. },
  3067. {
  3068. name: "Size",
  3069. type: "option",
  3070. value: Hash.SNEFRU_SIZE
  3071. }
  3072. ]
  3073. },
  3074. "HMAC": {
  3075. module: "Hashing",
  3076. description: "Keyed-Hash Message Authentication Codes (HMAC) are a mechanism for message authentication using cryptographic hash functions.",
  3077. inputType: "string",
  3078. outputType: "string",
  3079. args: [
  3080. {
  3081. name: "Password",
  3082. type: "binaryString",
  3083. value: ""
  3084. },
  3085. {
  3086. name: "Hashing function",
  3087. type: "option",
  3088. value: Hash.HMAC_FUNCTIONS
  3089. },
  3090. ]
  3091. },
  3092. "Fletcher-8 Checksum": {
  3093. module: "Hashing",
  3094. description: "The Fletcher checksum is an algorithm for computing a position-dependent checksum devised by John Gould Fletcher at Lawrence Livermore Labs in the late 1970s.<br><br>The objective of the Fletcher checksum was to provide error-detection properties approaching those of a cyclic redundancy check but with the lower computational effort associated with summation techniques.",
  3095. inputType: "byteArray",
  3096. outputType: "string",
  3097. args: []
  3098. },
  3099. "Fletcher-16 Checksum": {
  3100. module: "Hashing",
  3101. description: "The Fletcher checksum is an algorithm for computing a position-dependent checksum devised by John Gould Fletcher at Lawrence Livermore Labs in the late 1970s.<br><br>The objective of the Fletcher checksum was to provide error-detection properties approaching those of a cyclic redundancy check but with the lower computational effort associated with summation techniques.",
  3102. inputType: "byteArray",
  3103. outputType: "string",
  3104. args: []
  3105. },
  3106. "Fletcher-32 Checksum": {
  3107. module: "Hashing",
  3108. description: "The Fletcher checksum is an algorithm for computing a position-dependent checksum devised by John Gould Fletcher at Lawrence Livermore Labs in the late 1970s.<br><br>The objective of the Fletcher checksum was to provide error-detection properties approaching those of a cyclic redundancy check but with the lower computational effort associated with summation techniques.",
  3109. inputType: "byteArray",
  3110. outputType: "string",
  3111. args: []
  3112. },
  3113. "Fletcher-64 Checksum": {
  3114. module: "Hashing",
  3115. description: "The Fletcher checksum is an algorithm for computing a position-dependent checksum devised by John Gould Fletcher at Lawrence Livermore Labs in the late 1970s.<br><br>The objective of the Fletcher checksum was to provide error-detection properties approaching those of a cyclic redundancy check but with the lower computational effort associated with summation techniques.",
  3116. inputType: "byteArray",
  3117. outputType: "string",
  3118. args: []
  3119. },
  3120. "Adler-32 Checksum": {
  3121. module: "Hashing",
  3122. description: "Adler-32 is a checksum algorithm which was invented by Mark Adler in 1995, and is a modification of the Fletcher checksum. Compared to a cyclic redundancy check of the same length, it trades reliability for speed (preferring the latter).<br><br>Adler-32 is more reliable than Fletcher-16, and slightly less reliable than Fletcher-32.",
  3123. inputType: "byteArray",
  3124. outputType: "string",
  3125. args: []
  3126. },
  3127. "CRC-32 Checksum": {
  3128. module: "Hashing",
  3129. description: "A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.<br><br>The CRC was invented by W. Wesley Peterson in 1961; the 32-bit CRC function of Ethernet and many other standards is the work of several researchers and was published in 1975.",
  3130. inputType: "string",
  3131. outputType: "string",
  3132. args: []
  3133. },
  3134. "CRC-16 Checksum": {
  3135. module: "Hashing",
  3136. description: "A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.<br><br>The CRC was invented by W. Wesley Peterson in 1961.",
  3137. inputType: "string",
  3138. outputType: "string",
  3139. args: []
  3140. },
  3141. "Generate all hashes": {
  3142. module: "Hashing",
  3143. description: "Generates all available hashes and checksums for the input.",
  3144. inputType: "string",
  3145. outputType: "string",
  3146. args: []
  3147. },
  3148. "Entropy": {
  3149. module: "Default",
  3150. description: "Calculates the Shannon entropy of the input data which gives an idea of its randomness. 8 is the maximum.",
  3151. inputType: "byteArray",
  3152. outputType: "html",
  3153. args: [
  3154. {
  3155. name: "Chunk size",
  3156. type: "number",
  3157. value: Entropy.CHUNK_SIZE
  3158. }
  3159. ]
  3160. },
  3161. "Frequency distribution": {
  3162. module: "Default",
  3163. description: "Displays the distribution of bytes in the data as a graph.",
  3164. inputType: "byteArray",
  3165. outputType: "html",
  3166. args: [
  3167. {
  3168. name: "Show 0%'s",
  3169. type: "boolean",
  3170. value: Entropy.FREQ_ZEROS
  3171. }
  3172. ]
  3173. },
  3174. "Numberwang": {
  3175. module: "Default",
  3176. description: "Based on the popular gameshow by Mitchell and Webb.",
  3177. inputType: "string",
  3178. outputType: "string",
  3179. args: []
  3180. },
  3181. "Parse X.509 certificate": {
  3182. module: "PublicKey",
  3183. description: "X.509 is an ITU-T standard for a public key infrastructure (PKI) and Privilege Management Infrastructure (PMI). It is commonly involved with SSL/TLS security.<br><br>This operation displays the contents of a certificate in a human readable format, similar to the openssl command line tool.",
  3184. inputType: "string",
  3185. outputType: "string",
  3186. args: [
  3187. {
  3188. name: "Input format",
  3189. type: "option",
  3190. value: PublicKey.X509_INPUT_FORMAT
  3191. }
  3192. ]
  3193. },
  3194. "PEM to Hex": {
  3195. module: "PublicKey",
  3196. description: "Converts PEM (Privacy Enhanced Mail) format to a hexadecimal DER (Distinguished Encoding Rules) string.",
  3197. inputType: "string",
  3198. outputType: "string",
  3199. args: []
  3200. },
  3201. "Hex to PEM": {
  3202. module: "PublicKey",
  3203. description: "Converts a hexadecimal DER (Distinguished Encoding Rules) string into PEM (Privacy Enhanced Mail) format.",
  3204. inputType: "string",
  3205. outputType: "string",
  3206. args: [
  3207. {
  3208. name: "Header string",
  3209. type: "string",
  3210. value: PublicKey.PEM_HEADER_STRING
  3211. }
  3212. ]
  3213. },
  3214. "Hex to Object Identifier": {
  3215. module: "PublicKey",
  3216. description: "Converts a hexadecimal string into an object identifier (OID).",
  3217. inputType: "string",
  3218. outputType: "string",
  3219. args: []
  3220. },
  3221. "Object Identifier to Hex": {
  3222. module: "PublicKey",
  3223. description: "Converts an object identifier (OID) into a hexadecimal string.",
  3224. inputType: "string",
  3225. outputType: "string",
  3226. args: []
  3227. },
  3228. "Parse ASN.1 hex string": {
  3229. module: "PublicKey",
  3230. description: "Abstract Syntax Notation One (ASN.1) is a standard and notation that describes rules and structures for representing, encoding, transmitting, and decoding data in telecommunications and computer networking.<br><br>This operation parses arbitrary ASN.1 data and presents the resulting tree.",
  3231. inputType: "string",
  3232. outputType: "string",
  3233. args: [
  3234. {
  3235. name: "Starting index",
  3236. type: "number",
  3237. value: 0
  3238. },
  3239. {
  3240. name: "Truncate octet strings longer than",
  3241. type: "number",
  3242. value: PublicKey.ASN1_TRUNCATE_LENGTH
  3243. }
  3244. ]
  3245. },
  3246. "Detect File Type": {
  3247. module: "Default",
  3248. description: "Attempts to guess the MIME (Multipurpose Internet Mail Extensions) type of the data based on 'magic bytes'.<br><br>Currently supports the following file types: 7z, amr, avi, bmp, bz2, class, cr2, crx, dex, dmg, doc, elf, eot, epub, exe, flac, flv, gif, gz, ico, iso, jpg, jxr, m4a, m4v, mid, mkv, mov, mp3, mp4, mpg, ogg, otf, pdf, png, ppt, ps, psd, rar, rtf, sqlite, swf, tar, tar.z, tif, ttf, utf8, vmdk, wav, webm, webp, wmv, woff, woff2, xls, xz, zip.",
  3249. inputType: "byteArray",
  3250. outputType: "string",
  3251. args: []
  3252. },
  3253. "Scan for Embedded Files": {
  3254. module: "Default",
  3255. description: "Scans the data for potential embedded files by looking for magic bytes at all offsets. This operation is prone to false positives.<br><br>WARNING: Files over about 100KB in size will take a VERY long time to process.",
  3256. inputType: "byteArray",
  3257. outputType: "string",
  3258. args: [
  3259. {
  3260. name: "Ignore common byte sequences",
  3261. type: "boolean",
  3262. value: FileType.IGNORE_COMMON_BYTE_SEQUENCES
  3263. }
  3264. ]
  3265. },
  3266. "Expand alphabet range": {
  3267. module: "Default",
  3268. description: "Expand an alphabet range string into a list of the characters in that range.<br><br>e.g. <code>a-z</code> becomes <code>abcdefghijklmnopqrstuvwxyz</code>.",
  3269. inputType: "string",
  3270. outputType: "string",
  3271. args: [
  3272. {
  3273. name: "Delimiter",
  3274. type: "binaryString",
  3275. value: ""
  3276. }
  3277. ]
  3278. },
  3279. "Diff": {
  3280. module: "Diff",
  3281. description: "Compares two inputs (separated by the specified delimiter) and highlights the differences between them.",
  3282. inputType: "string",
  3283. outputType: "html",
  3284. args: [
  3285. {
  3286. name: "Sample delimiter",
  3287. type: "binaryString",
  3288. value: Diff.DIFF_SAMPLE_DELIMITER
  3289. },
  3290. {
  3291. name: "Diff by",
  3292. type: "option",
  3293. value: Diff.DIFF_BY
  3294. },
  3295. {
  3296. name: "Show added",
  3297. type: "boolean",
  3298. value: true
  3299. },
  3300. {
  3301. name: "Show removed",
  3302. type: "boolean",
  3303. value: true
  3304. },
  3305. {
  3306. name: "Ignore whitespace (relevant for word and line)",
  3307. type: "boolean",
  3308. value: false
  3309. }
  3310. ]
  3311. },
  3312. "Parse UNIX file permissions": {
  3313. module: "Default",
  3314. description: "Given a UNIX/Linux file permission string in octal or textual format, this operation explains which permissions are granted to which user groups.<br><br>Input should be in either octal (e.g. <code>755</code>) or textual (e.g. <code>drwxr-xr-x</code>) format.",
  3315. inputType: "string",
  3316. outputType: "string",
  3317. args: []
  3318. },
  3319. "Swap endianness": {
  3320. module: "Default",
  3321. 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.",
  3322. highlight: true,
  3323. highlightReverse: true,
  3324. inputType: "string",
  3325. outputType: "string",
  3326. args: [
  3327. {
  3328. name: "Data format",
  3329. type: "option",
  3330. value: Endian.DATA_FORMAT
  3331. },
  3332. {
  3333. name: "Word length (bytes)",
  3334. type: "number",
  3335. value: Endian.WORD_LENGTH
  3336. },
  3337. {
  3338. name: "Pad incomplete words",
  3339. type: "boolean",
  3340. value: Endian.PAD_INCOMPLETE_WORDS
  3341. }
  3342. ]
  3343. },
  3344. "Microsoft Script Decoder": {
  3345. module: "Default",
  3346. description: "Decodes Microsoft Encoded Script files that have been encoded with Microsoft's custom encoding. These are often VBS (Visual Basic Script) files that are encoded and renamed with a '.vbe' extention or JS (JScript) files renamed with a '.jse' extention.<br><br><b>Sample</b><br><br>Encoded:<br><code>#@~^RQAAAA==-mD~sX|:/TP{~J:+dYbxL~@!F@*@!+@*@!&amp;@*eEI@#@&amp;@#@&amp;.jm.raY 214Wv:zms/obI0xEAAA==^#~@</code><br><br>Decoded:<br><code>var my_msg = &#34;Testing <1><2><3>!&#34;;\n\nVScript.Echo(my_msg);</code>",
  3347. inputType: "string",
  3348. outputType: "string",
  3349. args: []
  3350. },
  3351. "Syntax highlighter": {
  3352. module: "Code",
  3353. 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.",
  3354. highlight: true,
  3355. highlightReverse: true,
  3356. inputType: "string",
  3357. outputType: "html",
  3358. args: [
  3359. {
  3360. name: "Language/File extension",
  3361. type: "option",
  3362. value: Code.LANGUAGES
  3363. },
  3364. {
  3365. name: "Display line numbers",
  3366. type: "boolean",
  3367. value: Code.LINE_NUMS
  3368. }
  3369. ]
  3370. },
  3371. "TCP/IP Checksum": {
  3372. module: "Hashing",
  3373. description: "Calculates the checksum for a TCP (Transport Control Protocol) or IP (Internet Protocol) header from an input of raw bytes.",
  3374. inputType: "byteArray",
  3375. outputType: "string",
  3376. args: []
  3377. },
  3378. "Parse colour code": {
  3379. module: "Default",
  3380. description: "Converts a colour code in a standard format to other standard formats and displays the colour itself.<br><br><strong>Example inputs</strong><ul><li><code>#d9edf7</code></li><li><code>rgba(217,237,247,1)</code></li><li><code>hsla(200,65%,91%,1)</code></li><li><code>cmyk(0.12, 0.04, 0.00, 0.03)</code></li></ul>",
  3381. inputType: "string",
  3382. outputType: "html",
  3383. args: []
  3384. },
  3385. "Generate UUID": {
  3386. module: "Default",
  3387. description: "Generates an RFC 4122 version 4 compliant Universally Unique Identifier (UUID), also known as a Globally Unique Identifier (GUID).<br><br>A version 4 UUID relies on random numbers, in this case generated using <code>window.crypto</code> if available and falling back to <code>Math.random</code> if not.",
  3388. inputType: "string",
  3389. outputType: "string",
  3390. args: []
  3391. },
  3392. "Substitute": {
  3393. module: "Ciphers",
  3394. 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.<br><br>Enter the bytes you want to replace in the Plaintext field and the bytes to replace them with in the Ciphertext field.<br><br>Non-printable bytes can be specified using string escape notation. For example, a line feed character can be written as either <code>\\n</code> or <code>\\x0a</code>.<br><br>Byte ranges can be specified using a hyphen. For example, the sequence <code>0123456789</code> can be written as <code>0-9</code>.",
  3395. inputType: "string",
  3396. outputType: "string",
  3397. args: [
  3398. {
  3399. name: "Plaintext",
  3400. type: "binaryString",
  3401. value: Cipher.SUBS_PLAINTEXT
  3402. },
  3403. {
  3404. name: "Ciphertext",
  3405. type: "binaryString",
  3406. value: Cipher.SUBS_CIPHERTEXT
  3407. }
  3408. ]
  3409. },
  3410. "Escape string": {
  3411. module: "Default",
  3412. description: "Escapes special characters in a string so that they do not cause conflicts. For example, <code>Don't stop me now</code> becomes <code>Don\\'t stop me now</code>.",
  3413. inputType: "string",
  3414. outputType: "string",
  3415. args: []
  3416. },
  3417. "Unescape string": {
  3418. module: "Default",
  3419. description: "Unescapes characters in a string that have been escaped. For example, <code>Don\\'t stop me now</code> becomes <code>Don't stop me now</code>.",
  3420. inputType: "string",
  3421. outputType: "string",
  3422. args: []
  3423. },
  3424. "To Morse Code": {
  3425. module: "Default",
  3426. description: "Translates alphanumeric characters into International Morse Code.<br><br>Ignores non-Morse characters.<br><br>e.g. <code>SOS</code> becomes <code>... --- ...</code>",
  3427. inputType: "string",
  3428. outputType: "string",
  3429. args: [
  3430. {
  3431. name: "Format options",
  3432. type: "option",
  3433. value: MorseCode.FORMAT_OPTIONS
  3434. },
  3435. {
  3436. name: "Letter delimiter",
  3437. type: "option",
  3438. value: MorseCode.LETTER_DELIM_OPTIONS
  3439. },
  3440. {
  3441. name: "Word delimiter",
  3442. type: "option",
  3443. value: MorseCode.WORD_DELIM_OPTIONS
  3444. }
  3445. ]
  3446. },
  3447. "From Morse Code": {
  3448. module: "Default",
  3449. description: "Translates Morse Code into (upper case) alphanumeric characters.",
  3450. inputType: "string",
  3451. outputType: "string",
  3452. args: [
  3453. {
  3454. name: "Letter delimiter",
  3455. type: "option",
  3456. value: MorseCode.LETTER_DELIM_OPTIONS
  3457. },
  3458. {
  3459. name: "Word delimiter",
  3460. type: "option",
  3461. value: MorseCode.WORD_DELIM_OPTIONS
  3462. }
  3463. ]
  3464. },
  3465. "Tar": {
  3466. module: "Compression",
  3467. description: "Packs the input into a tarball.<br><br>No support for multiple files at this time.",
  3468. inputType: "byteArray",
  3469. outputType: "byteArray",
  3470. args: [
  3471. {
  3472. name: "Filename",
  3473. type: "string",
  3474. value: Compress.TAR_FILENAME
  3475. }
  3476. ]
  3477. },
  3478. "Untar": {
  3479. module: "Compression",
  3480. description: "Unpacks a tarball and displays it per file.",
  3481. inputType: "byteArray",
  3482. outputType: "html",
  3483. args: [
  3484. ]
  3485. },
  3486. "Head": {
  3487. module: "Default",
  3488. description: [
  3489. "Like the UNIX head utility.",
  3490. "<br>",
  3491. "Gets the first n lines.",
  3492. "<br>",
  3493. "You can select all but the last n lines by entering a negative value for n.",
  3494. "<br>",
  3495. "The delimiter can be changed so that instead of lines, fields (i.e. commas) are selected instead.",
  3496. ].join("\n"),
  3497. inputType: "string",
  3498. outputType: "string",
  3499. args: [
  3500. {
  3501. name: "Delimiter",
  3502. type: "option",
  3503. value: StrUtils.DELIMITER_OPTIONS
  3504. },
  3505. {
  3506. name: "Number",
  3507. type: "number",
  3508. value: 10,
  3509. },
  3510. ]
  3511. },
  3512. "Tail": {
  3513. module: "Default",
  3514. description: [
  3515. "Like the UNIX tail utility.",
  3516. "<br>",
  3517. "Gets the last n lines.",
  3518. "<br>",
  3519. "Optionally you can select all lines after line n by entering a negative value for n.",
  3520. "<br>",
  3521. "The delimiter can be changed so that instead of lines, fields (i.e. commas) are selected instead.",
  3522. ].join("\n"),
  3523. inputType: "string",
  3524. outputType: "string",
  3525. args: [
  3526. {
  3527. name: "Delimiter",
  3528. type: "option",
  3529. value: StrUtils.DELIMITER_OPTIONS
  3530. },
  3531. {
  3532. name: "Number",
  3533. type: "number",
  3534. value: 10,
  3535. },
  3536. ]
  3537. },
  3538. "To Snake case": {
  3539. module: "Code",
  3540. description: [
  3541. "Converts the input string to snake case.",
  3542. "<br><br>",
  3543. "Snake case is all lower case with underscores as word boundaries.",
  3544. "<br><br>",
  3545. "e.g. this_is_snake_case",
  3546. "<br><br>",
  3547. "'Attempt to be context aware' will make the operation attempt to nicely transform variable and function names.",
  3548. ].join("\n"),
  3549. inputType: "string",
  3550. outputType: "string",
  3551. args: [
  3552. {
  3553. name: "Attempt to be context aware",
  3554. type: "boolean",
  3555. value: false,
  3556. },
  3557. ]
  3558. },
  3559. "To Camel case": {
  3560. module: "Code",
  3561. description: [
  3562. "Converts the input string to camel case.",
  3563. "<br><br>",
  3564. "Camel case is all lower case except letters after word boundaries which are uppercase.",
  3565. "<br><br>",
  3566. "e.g. thisIsCamelCase",
  3567. "<br><br>",
  3568. "'Attempt to be context aware' will make the operation attempt to nicely transform variable and function names.",
  3569. ].join("\n"),
  3570. inputType: "string",
  3571. outputType: "string",
  3572. args: [
  3573. {
  3574. name: "Attempt to be context aware",
  3575. type: "boolean",
  3576. value: false,
  3577. },
  3578. ]
  3579. },
  3580. "To Kebab case": {
  3581. module: "Code",
  3582. description: [
  3583. "Converts the input string to kebab case.",
  3584. "<br><br>",
  3585. "Kebab case is all lower case with dashes as word boundaries.",
  3586. "<br><br>",
  3587. "e.g. this-is-kebab-case",
  3588. "<br><br>",
  3589. "'Attempt to be context aware' will make the operation attempt to nicely transform variable and function names.",
  3590. ].join("\n"),
  3591. inputType: "string",
  3592. outputType: "string",
  3593. args: [
  3594. {
  3595. name: "Attempt to be context aware",
  3596. type: "boolean",
  3597. value: false,
  3598. },
  3599. ]
  3600. },
  3601. "Extract EXIF": {
  3602. module: "Image",
  3603. description: [
  3604. "Extracts EXIF data from an image.",
  3605. "<br><br>",
  3606. "EXIF data is metadata embedded in images (JPEG, JPG, TIFF) and audio files.",
  3607. "<br><br>",
  3608. "EXIF data from photos usually contains information about the image file itself as well as the device used to create it.",
  3609. ].join("\n"),
  3610. inputType: "byteArray",
  3611. outputType: "string",
  3612. args: [],
  3613. },
  3614. "Render Image": {
  3615. module: "Image",
  3616. description: "Displays the input as an image. Supports the following formats:<br><br><ul><li>jpg/jpeg</li><li>png</li><li>gif</li><li>webp</li><li>bmp</li><li>ico</li></ul>",
  3617. inputType: "string",
  3618. outputType: "html",
  3619. args: [
  3620. {
  3621. name: "Input format",
  3622. type: "option",
  3623. value: Image.INPUT_FORMAT
  3624. }
  3625. ]
  3626. },
  3627. "Remove EXIF": {
  3628. module: "Image",
  3629. description: [
  3630. "Removes EXIF data from a JPEG image.",
  3631. "<br><br>",
  3632. "EXIF data embedded in photos usually contains information about the image file itself as well as the device used to create it.",
  3633. ].join("\n"),
  3634. inputType: "byteArray",
  3635. outputType: "byteArray",
  3636. args: []
  3637. },
  3638. "HTTP request": {
  3639. module: "HTTP",
  3640. description: [
  3641. "Makes an HTTP request and returns the response.",
  3642. "<br><br>",
  3643. "This operation supports different HTTP verbs like GET, POST, PUT, etc.",
  3644. "<br><br>",
  3645. "You can add headers line by line in the format <code>Key: Value</code>",
  3646. "<br><br>",
  3647. "The status code of the response, along with a limited selection of exposed headers, can be viewed by checking the 'Show response metadata' option. Only a limited set of response headers are exposed by the browser for security reasons.",
  3648. ].join("\n"),
  3649. inputType: "string",
  3650. outputType: "string",
  3651. manualBake: true,
  3652. args: [
  3653. {
  3654. name: "Method",
  3655. type: "option",
  3656. value: HTTP.METHODS,
  3657. },
  3658. {
  3659. name: "URL",
  3660. type: "string",
  3661. value: "",
  3662. },
  3663. {
  3664. name: "Headers",
  3665. type: "text",
  3666. value: "",
  3667. },
  3668. {
  3669. name: "Mode",
  3670. type: "option",
  3671. value: HTTP.MODE,
  3672. },
  3673. {
  3674. name: "Show response metadata",
  3675. type: "boolean",
  3676. value: false,
  3677. }
  3678. ]
  3679. },
  3680. "From BCD": {
  3681. module: "Default",
  3682. description: "Binary-Coded Decimal (BCD) is a class of binary encodings of decimal numbers where each decimal digit is represented by a fixed number of bits, usually four or eight. Special bit patterns are sometimes used for a sign.",
  3683. inputType: "string",
  3684. outputType: "number",
  3685. args: [
  3686. {
  3687. name: "Scheme",
  3688. type: "option",
  3689. value: BCD.ENCODING_SCHEME
  3690. },
  3691. {
  3692. name: "Packed",
  3693. type: "boolean",
  3694. value: true
  3695. },
  3696. {
  3697. name: "Signed",
  3698. type: "boolean",
  3699. value: false
  3700. },
  3701. {
  3702. name: "Input format",
  3703. type: "option",
  3704. value: BCD.FORMAT
  3705. }
  3706. ]
  3707. },
  3708. "To BCD": {
  3709. module: "Default",
  3710. description: "Binary-Coded Decimal (BCD) is a class of binary encodings of decimal numbers where each decimal digit is represented by a fixed number of bits, usually four or eight. Special bit patterns are sometimes used for a sign",
  3711. inputType: "number",
  3712. outputType: "string",
  3713. args: [
  3714. {
  3715. name: "Scheme",
  3716. type: "option",
  3717. value: BCD.ENCODING_SCHEME
  3718. },
  3719. {
  3720. name: "Packed",
  3721. type: "boolean",
  3722. value: true
  3723. },
  3724. {
  3725. name: "Signed",
  3726. type: "boolean",
  3727. value: false
  3728. },
  3729. {
  3730. name: "Output format",
  3731. type: "option",
  3732. value: BCD.FORMAT
  3733. }
  3734. ]
  3735. },
  3736. "Bit shift left": {
  3737. module: "Default",
  3738. description: "Shifts the bits in each byte towards the left by the specified amount.",
  3739. inputType: "byteArray",
  3740. outputType: "byteArray",
  3741. highlight: true,
  3742. highlightReverse: true,
  3743. args: [
  3744. {
  3745. name: "Amount",
  3746. type: "number",
  3747. value: 1
  3748. },
  3749. ]
  3750. },
  3751. "Bit shift right": {
  3752. module: "Default",
  3753. description: "Shifts the bits in each byte towards the right by the specified amount.<br><br><i>Logical shifts</i> replace the leftmost bits with zeros.<br><i>Arithmetic shifts</i> preserve the most significant bit (MSB) of the original byte keeping the sign the same (positive or negative).",
  3754. inputType: "byteArray",
  3755. outputType: "byteArray",
  3756. highlight: true,
  3757. highlightReverse: true,
  3758. args: [
  3759. {
  3760. name: "Amount",
  3761. type: "number",
  3762. value: 1
  3763. },
  3764. {
  3765. name: "Type",
  3766. type: "option",
  3767. value: BitwiseOp.BIT_SHIFT_TYPE
  3768. }
  3769. ]
  3770. },
  3771. "Generate TOTP": {
  3772. module: "Default",
  3773. description: "The Time-based One-Time Password algorithm (TOTP) is an algorithm that computes a one-time password from a shared secret key and the current time. It has been adopted as Internet Engineering Task Force standard RFC 6238, is the cornerstone of Initiative For Open Authentication (OATH), and is used in a number of two-factor authentication systems. A TOTP is an HOTP where the counter is the current time.<br><br>Enter the secret as the input or leave it blank for a random secret to be generated. T0 and T1 are in seconds.",
  3774. inputType: "byteArray",
  3775. outputType: "string",
  3776. args: [
  3777. {
  3778. name: "Name",
  3779. type: "string",
  3780. value: ""
  3781. },
  3782. {
  3783. name: "Key size",
  3784. type: "number",
  3785. value: 32
  3786. },
  3787. {
  3788. name: "Code length",
  3789. type: "number",
  3790. value: 6
  3791. },
  3792. {
  3793. name: "Epoch offset (T0)",
  3794. type: "number",
  3795. value: 0
  3796. },
  3797. {
  3798. name: "Interval (T1)",
  3799. type: "number",
  3800. value: 30
  3801. }
  3802. ]
  3803. },
  3804. "Generate HOTP": {
  3805. module: "Default",
  3806. description: "The HMAC-based One-Time Password algorithm (HOTP) is an algorithm that computes a one-time password from a shared secret key and an incrementing counter. It has been adopted as Internet Engineering Task Force standard RFC 4226, is the cornerstone of Initiative For Open Authentication (OATH), and is used in a number of two-factor authentication systems.<br><br>Enter the secret as the input or leave it blank for a random secret to be generated.",
  3807. inputType: "string",
  3808. outputType: "string",
  3809. args: [
  3810. {
  3811. name: "Name",
  3812. type: "string",
  3813. value: ""
  3814. },
  3815. {
  3816. name: "Key size",
  3817. type: "number",
  3818. value: 32
  3819. },
  3820. {
  3821. name: "Code length",
  3822. type: "number",
  3823. value: 6
  3824. },
  3825. {
  3826. name: "Counter",
  3827. type: "number",
  3828. value: 0
  3829. }
  3830. ]
  3831. },
  3832. "PHP Deserialize": {
  3833. module: "Default",
  3834. description: "Deserializes PHP serialized data, outputting keyed arrays as JSON.<br><br>This function does not support <code>object</code> tags.<br><br>Example:<br><code>a:2:{s:1:&quot;a&quot;;i:10;i:0;a:1:{s:2:&quot;ab&quot;;b:1;}}</code><br>becomes<br><code>{&quot;a&quot;: 10,0: {&quot;ab&quot;: true}}</code><br><br><u>Output valid JSON:</u> JSON doesn't support integers as keys, whereas PHP serialization does. Enabling this will cast these integers to strings. This will also escape backslashes.",
  3835. inputType: "string",
  3836. outputType: "string",
  3837. args: [
  3838. {
  3839. name: "Output valid JSON",
  3840. type: "boolean",
  3841. value: PHP.OUTPUT_VALID_JSON
  3842. }
  3843. ]
  3844. },
  3845. };
  3846. /**
  3847. * Exports the OperationConfig JSON object in val-loader format so that it can be loaded
  3848. * into the app without also importing all the dependencies.
  3849. *
  3850. * See https://github.com/webpack-contrib/val-loader
  3851. *
  3852. * @returns {Object}
  3853. */
  3854. function valExport() {
  3855. return {
  3856. code: "module.exports = " + JSON.stringify(OperationConfig) + ";"
  3857. };
  3858. }
  3859. export default valExport;
  3860. export { OperationConfig };