OperationConfig.js 142 KB

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