Used regex to change block format

This commit is contained in:
Tim Stallard 2017-03-13 12:41:56 +00:00
parent 2bedbea8a7
commit eb26bea14e
20 changed files with 217 additions and 38 deletions

View File

@ -1,9 +1,24 @@
module.exports = {
name: "Affine Decrypt",
inputs: {
text: "Text",
a: "a",
b: "b"
text: {
name: "Text",
type: "text",
required: true,
inline: false
},
a: {
name: "a",
type: "text",
required: true,
inline: false
},
b: {
name: "b",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({text, a, b}, elem){

View File

@ -1,9 +1,24 @@
module.exports = {
name: "Affine Encrypt",
inputs: {
text: "Text",
a: "a",
b: "b"
text: {
name: "Text",
type: "text",
required: true,
inline: false
},
a: {
name: "a",
type: "text",
required: true,
inline: false
},
b: {
name: "b",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({text, a, b}, elem){

View File

@ -1,7 +1,12 @@
module.exports = {
name: "ASCII to Hex",
inputs: {
text: "Text"
text: {
name: "Text",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({text}, elem){

View File

@ -1,7 +1,12 @@
module.exports = {
name: "Atbash",
inputs: {
text: "Text"
text: {
name: "Text",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({text}, elem){

View File

@ -2,12 +2,16 @@ module.exports = {
name: "Caesar",
inputs: {
text: {
name: "Text"
name: "Text",
type: "text",
required: true,
inline: false
},
shift: {
name: "Shift",
inline: true,
type: "number"
type: "number",
required: true,
inline: true
}
},
output: true,

View File

@ -1,8 +1,18 @@
module.exports = {
name: "Concat",
inputs: {
str1: "String 1",
str2: "String 2"
str1: {
name: "String 1",
type: "text",
required: true,
inline: false
},
str2: {
name: "String 2",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({str1, str2}, block){

View File

@ -3,11 +3,36 @@ var events = require("../events.js");
module.exports = {
name: "Custom Code",
inputs: {
inp1: "1",
inp2: "2",
inp3: "3",
inp4: "4",
inp5: "5"
inp1: {
name: "1",
type: "text",
required: true,
inline: false
},
inp2: {
name: "2",
type: "text",
required: true,
inline: false
},
inp3: {
name: "3",
type: "text",
required: true,
inline: false
},
inp4: {
name: "4",
type: "text",
required: true,
inline: false
},
inp5: {
name: "5",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function(inputs, block){

View File

@ -1,7 +1,12 @@
module.exports = {
name: "Elements to Numbers",
inputs: {
elements: "Elements"
elements: {
name: "Elements",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({elements}, elem){

View File

@ -50,7 +50,12 @@ function topGroupsByFrequency(groups, alreadyPercentage){
module.exports = {
name: "Frequency Analysis",
inputs: {
input: "Input"
input: {
name: "Input",
type: "text",
required: true,
inline: false
}
},
output: false,
execute: function({input}, block){

View File

@ -1,7 +1,12 @@
module.exports = {
name: "Hex to ASCII",
inputs: {
hex: "Hex String"
hex: {
name: "Hex String",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({hex}, elem){

View File

@ -1,8 +1,18 @@
module.exports = {
name: "Letters to Numbers",
inputs: {
letters: "Letters",
offset: "Offset"
letters: {
name: "Letters",
type: "text",
required: true,
inline: false
},
offset: {
name: "Offset",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({letters, offset}, elem){

View File

@ -1,7 +1,12 @@
module.exports = {
name: "Numbers to Elements",
inputs: {
numbers: "Numbers"
numbers: {
name: "Numbers",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({numbers}, elem){

View File

@ -1,8 +1,18 @@
module.exports = {
name: "Numbers to Letters",
inputs: {
nums: "Numbers",
offset: "Offset"
nums: {
name: "Numbers",
type: "text",
required: true,
inline: false
},
offset: {
name: "Offset",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({nums, offset}, elem){

View File

@ -1,7 +1,12 @@
module.exports = {
name: "Reverse",
inputs: {
input: "Input"
input: {
name: "Input",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({input}, elem){

View File

@ -1,8 +1,18 @@
module.exports = {
name: "Substitution",
inputs: {
text: "Text",
mapping: "Mapping"
text: {
name: "Text",
type: "text",
required: true,
inline: false
},
mapping: {
name: "Mapping",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({text, mapping}, elem){

View File

@ -1,7 +1,12 @@
module.exports = {
name: "Example Block",
inputs: {
input: "Input"
input: {
name: "Input",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({input}, elem){

View File

@ -1,8 +1,18 @@
module.exports = {
name: "Transposition",
inputs: {
text: "Text",
n: "n"
text: {
name: "Text",
type: "text",
required: true,
inline: false
},
n: {
name: "n",
type: "number",
required: true,
inline: true
}
},
output: true,
execute: function({text, n}, elem){

View File

@ -1,8 +1,18 @@
module.exports = {
name: "Transposition Reverse",
inputs: {
text: "Text",
n: "n"
text: {
name: "Text",
type: "text",
required: true,
inline: false
},
n: {
name: "n",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({text, n}, elem){

View File

@ -1,8 +1,18 @@
module.exports = {
name: "Vigenere Decode",
inputs: {
cipherText: "Ciphertext",
key: "Key"
cipherText: {
name: "Ciphertext",
type: "text",
required: true,
inline: false
},
key: {
name: "Key",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({cipherText, key}, elem){

View File

@ -1,8 +1,18 @@
module.exports = {
name: "Vigenere Encode",
inputs: {
plaintext: "Plaintext",
key: "Key"
plaintext: {
name: "Plaintext",
type: "text",
required: true,
inline: false
},
key: {
name: "Key",
type: "text",
required: true,
inline: false
}
},
output: true,
execute: function({plaintext, key}, elem){