lightning-bolt 1.5.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lightning/bolt.rb +102 -79
- data/lib/lightning/bolt/cypher.rb +2 -2
- data/lib/lightning/bolt/fuzzer.rb +7 -3
- data/lib/lightning/bolt/version.rb +1 -1
- metadata +2 -5
- data/specs/baseline.yml +0 -79
- data/specs/checkpoints.rb +0 -22
- data/specs/payload.yml +0 -116
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbf88be6e8d1719062216cdda80ec28ceda1e800
|
4
|
+
data.tar.gz: 818bbcfb2e4b0e34802a304204df7fbcc67b9ba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebcd795016f618cd0f5fef18a21b1c7b964988c75916eae3ba702dbea009dd03a4eb8d480f653089fd5c5a553da4dda98626da4f46828a0911325ef2e63e3a76
|
7
|
+
data.tar.gz: 889904d969dce46323cebcfd87db3ef2b1cb346d6282c4a8dc004f666422412fab9e32c8ab206f2399df0b2cccfc308bdc9e5df9d6fcf42adb2349442b7ca153
|
data/lib/lightning/bolt.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require_relative "bolt/cypher"
|
2
|
+
require_relative "bolt/fuzzer"
|
3
|
+
require_relative "bolt/version"
|
4
4
|
|
5
5
|
require 'yaml'
|
6
6
|
require 'json'
|
@@ -12,35 +12,46 @@ module Lightning
|
|
12
12
|
def initialize(bookstore, theorems, memories)
|
13
13
|
@cypher = Lightning::Bolt::Cypher.new(bookstore)
|
14
14
|
@fuzzer = Lightning::Bolt::Fuzzer.new('UTF-8')
|
15
|
-
@keys = YAML.load_file("#{File.dirname(__FILE__)}/keys.yml")
|
16
|
-
@passable = true
|
15
|
+
@keys = YAML.load_file("#{File.dirname(__FILE__)}/bolt/keys.yml")
|
17
16
|
@theorems = theorems
|
18
|
-
@
|
17
|
+
@memories = memories
|
18
|
+
@thoughts = []
|
19
19
|
end
|
20
20
|
|
21
|
-
def signal(
|
22
|
-
@passable = passable.eql?(nil) ? true : passable
|
23
|
-
unique = unique.eql?(nil) ? false : unique
|
21
|
+
def signal(mode, unique, name)
|
24
22
|
path = nil
|
25
23
|
@theorems.each do | theorem |
|
26
24
|
if theorem["name"].eql?(name)
|
27
25
|
path = theorem["path"]
|
28
26
|
end
|
29
27
|
end
|
28
|
+
return validate(mode, unique, path)
|
29
|
+
end
|
30
|
+
|
31
|
+
def validate(mode, unique, path)
|
32
|
+
@mode = mode.eql?(nil) ? 'system' : mode
|
33
|
+
unique = unique.eql?(nil) ? false : unique
|
34
|
+
data = ""
|
30
35
|
if path
|
31
|
-
data = decrypt(path)
|
32
36
|
if unique
|
33
|
-
|
34
|
-
|
37
|
+
is_unique = false
|
38
|
+
while !is_unique
|
39
|
+
data = decrypt(path)
|
40
|
+
hash = Digest::SHA256.hexdigest(path)
|
41
|
+
if @memories[hash].eql?(nil)
|
42
|
+
@memories[hash] = data
|
43
|
+
is_unique = true
|
44
|
+
end
|
45
|
+
end
|
46
|
+
else
|
47
|
+
data = decrypt(path)
|
35
48
|
end
|
36
|
-
return path
|
37
|
-
else
|
38
|
-
return ""
|
39
49
|
end
|
50
|
+
return data
|
40
51
|
end
|
41
52
|
|
42
53
|
def archive
|
43
|
-
return @
|
54
|
+
return @memories
|
44
55
|
end
|
45
56
|
|
46
57
|
private
|
@@ -51,12 +62,11 @@ module Lightning
|
|
51
62
|
rule = rotar(rule, @keys["keys"]["group"]) ? group(rule) : rule
|
52
63
|
rule = rotar(rule, @keys["keys"]["repeat"]) ? repeat(rule) : rule
|
53
64
|
rule = rotar(rule, @keys["keys"]["set"]) ? set(rule) : rule
|
54
|
-
rule = rotar(rule, @keys["keys"]["not"]) ? exclude(rule) : rule
|
55
65
|
rule = rotar(rule, @keys["keys"]["or"]) ? either(rule) : rule
|
56
66
|
rule = rotar(rule, @keys["keys"]["and"]) ? concat(rule) : rule
|
57
67
|
rule = rotar(rule, @keys["keys"]["exist"]) ? exist(rule) : rule
|
58
68
|
rule = rotar(rule, @keys["keys"]["escapable"]) ? escapable(rule) : rule
|
59
|
-
rule = rotar(rule, @keys["keys"]["
|
69
|
+
rule = rotar(rule, @keys["keys"]["memorize"]) ? remember(rule) : rule
|
60
70
|
return rule
|
61
71
|
end
|
62
72
|
|
@@ -84,14 +94,10 @@ module Lightning
|
|
84
94
|
|
85
95
|
def radar(map)
|
86
96
|
rule = ""
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
rule = theorem["rule"]
|
91
|
-
end
|
97
|
+
@theorems.each do | theorem |
|
98
|
+
if theorem["path"].eql?(map)
|
99
|
+
rule = theorem["rule"]
|
92
100
|
end
|
93
|
-
else
|
94
|
-
rule = @theorems[@fuzzer.random_number(0, @theorems.size)]
|
95
101
|
end
|
96
102
|
return rule
|
97
103
|
end
|
@@ -99,20 +105,26 @@ module Lightning
|
|
99
105
|
def datum(rule)
|
100
106
|
datum = rule.scan(Regexp.new(@keys["keys"]["data"]))
|
101
107
|
datum.each do | data |
|
102
|
-
|
103
|
-
|
108
|
+
arc = @cypher.arc(data)
|
109
|
+
if @mode.eql?('strict')
|
110
|
+
rule = rule.sub(data, @fuzzer.random_character(arc.size))
|
104
111
|
else
|
105
|
-
rule = rule.sub(data,
|
112
|
+
rule = rule.sub(data, arc)
|
106
113
|
end
|
107
114
|
end
|
108
115
|
return rule
|
109
116
|
end
|
110
117
|
|
111
118
|
def group(rule)
|
112
|
-
groups = rule.scan(Regexp.new(@keys["keys"]["group"]))
|
119
|
+
groups = rule.scan(Regexp.new(@keys["keys"]["not"] + "?" + @keys["keys"]["group"]))
|
120
|
+
invalid_groups = rule.scan(Regexp.new(@keys["keys"]["not"] + @keys["keys"]["group"]))
|
113
121
|
groups.each do | group |
|
114
122
|
group = group.join("")
|
115
|
-
|
123
|
+
if invalid_groups.size > 0 && @mode.eql?('regression') && group[1].eql?(@keys["keys"]["not"])
|
124
|
+
rule = rule.sub(group, decrypt(group[2..-2]))
|
125
|
+
else
|
126
|
+
rule = rule.sub(group, decrypt(group[1..-2]))
|
127
|
+
end
|
116
128
|
end
|
117
129
|
return rule
|
118
130
|
end
|
@@ -121,14 +133,24 @@ module Lightning
|
|
121
133
|
sets = rule.scan(Regexp.new(@keys["keys"]["set"]))
|
122
134
|
if sets
|
123
135
|
sets.each do | set |
|
124
|
-
rangesets = set[0].scan(Regexp.new(@keys["keys"]["range"]))
|
125
|
-
subsets = set[0].scan(Regexp.new(@keys["keys"]["subsets"]))
|
136
|
+
rangesets = set[0].scan(Regexp.new(@keys["keys"]["not"] + "?" + @keys["keys"]["range"]))
|
137
|
+
subsets = set[0].scan(Regexp.new(@keys["keys"]["not"] + "?" + @keys["keys"]["subsets"]))
|
126
138
|
if rangesets.size > 0
|
127
139
|
rangesets.each do | rangeset |
|
128
|
-
subranges =
|
129
|
-
|
130
|
-
|
131
|
-
|
140
|
+
subranges = Array.new
|
141
|
+
if !@mode.eql?('regression') && !rangeset[1].eql?(@keys["keys"]["not"][1])
|
142
|
+
subrangeset = rangeset[1..-2].split("..")
|
143
|
+
(subrangeset[0]..subrangeset[1]).each do | x |
|
144
|
+
subranges.push(x)
|
145
|
+
end
|
146
|
+
if subranges.size == 1
|
147
|
+
subranges = Array.new
|
148
|
+
(subrangeset[1]..subrangeset[0]).each do | x |
|
149
|
+
subranges.push(x)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
else
|
153
|
+
subranges.push(@fuzzer.random_character(1))
|
132
154
|
end
|
133
155
|
swap = subranges[@fuzzer.random_number(0,subranges.size)]
|
134
156
|
rule = rule.sub(rangeset, swap)
|
@@ -137,15 +159,17 @@ module Lightning
|
|
137
159
|
charset = []
|
138
160
|
subsets.each do | subset |
|
139
161
|
if subset
|
140
|
-
if @
|
141
|
-
charset
|
162
|
+
if @mode.eql?('strict')
|
163
|
+
charset.push(@fuzzer.random_character(1))
|
164
|
+
elsif @mode.eql?('regression') && subset[0][1].eql?(@keys["keys"]["not"][1])
|
165
|
+
charset.push(ruleset([subset[0][1..-1]]))
|
142
166
|
else
|
143
|
-
charset
|
167
|
+
charset.push(ruleset(subset[0]))
|
144
168
|
end
|
145
169
|
end
|
146
170
|
end
|
147
171
|
if charset.size > 0
|
148
|
-
char = charset[@fuzzer.random_number(0,charset.size)]
|
172
|
+
char = charset[0][@fuzzer.random_number(0,charset.size)]
|
149
173
|
rule = rule.sub(set[0], char)
|
150
174
|
end
|
151
175
|
end
|
@@ -166,6 +190,11 @@ module Lightning
|
|
166
190
|
(min..max).each do | range |
|
167
191
|
range_set.push(range)
|
168
192
|
end
|
193
|
+
if range_set.size == 1
|
194
|
+
(max..min).each do | range |
|
195
|
+
range_set.push(range)
|
196
|
+
end
|
197
|
+
end
|
169
198
|
charset += range_set
|
170
199
|
end
|
171
200
|
elsif subset.size == 2 && subset[0].eql?("\\")
|
@@ -178,18 +207,26 @@ module Lightning
|
|
178
207
|
end
|
179
208
|
|
180
209
|
def either(rule)
|
181
|
-
|
182
|
-
|
210
|
+
subrules = rule.split(Regexp.new(@keys["keys"]["not"] + "?" + @keys["keys"]["or"]))
|
211
|
+
testcases = Array.new
|
212
|
+
subrules.each do | subrule |
|
213
|
+
if !@mode.eql?('regression') && !subrule[1].eql?(@keys["keys"]["not"])
|
214
|
+
testcases.push(subrule)
|
215
|
+
elsif @mode.eql?('regression') && subrule[1].eql?(@keys["keys"]["not"])
|
216
|
+
testcases.push(subrule)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
subrule = ""
|
220
|
+
if testcases.size > 0
|
221
|
+
subrule = testcases[@fuzzer.random_number(0,subrules.length)]
|
222
|
+
else
|
223
|
+
subrule = subrules[@fuzzer.random_number(0,subrules.length)]
|
183
224
|
end
|
184
|
-
subrules = rule.split(Regexp.new(@keys["keys"]["or"]))
|
185
|
-
subrule = subrules[@fuzzer.random_number(0,subrules.length)]
|
186
225
|
rule = rule.sub(rule, decrypt(subrule))
|
226
|
+
return rule
|
187
227
|
end
|
188
228
|
|
189
229
|
def concat(rule)
|
190
|
-
if !@passable
|
191
|
-
rule = charflip(rule, "&", "|")
|
192
|
-
end
|
193
230
|
combinator = ""
|
194
231
|
subrules = rule.split(Regexp.new(@keys["keys"]["and"]))
|
195
232
|
subrules.each do | subrule |
|
@@ -198,19 +235,6 @@ module Lightning
|
|
198
235
|
return rule.sub(rule, combinator)
|
199
236
|
end
|
200
237
|
|
201
|
-
def charflip(str, a, b)
|
202
|
-
charset = str.split("")
|
203
|
-
charset.each_with_index do | set, index |
|
204
|
-
if set.eql?(a)
|
205
|
-
charset[index] = b
|
206
|
-
elsif set.eql?(b)
|
207
|
-
charset[index] = a
|
208
|
-
else
|
209
|
-
end
|
210
|
-
end
|
211
|
-
return charset.join("")
|
212
|
-
end
|
213
|
-
|
214
238
|
def exists(rule)
|
215
239
|
group_ranges = rule.match(Regexp.new(@keys["keys"]["group"] + @keys["keys"]["exist"]))
|
216
240
|
set_ranges = rule.match(Regexp.new(@keys["keys"]["set"] + @keys["keys"]["exist"]))
|
@@ -232,25 +256,22 @@ module Lightning
|
|
232
256
|
return rule
|
233
257
|
end
|
234
258
|
|
235
|
-
def exclude(rule)
|
236
|
-
rule.scan(Regexp.new(@keys["keys"]["exclude"]))
|
237
|
-
violated = true
|
238
|
-
while violated.eql?(true) do
|
239
|
-
violated = false
|
240
|
-
decrypt(rule)
|
241
|
-
end
|
242
|
-
return rule
|
243
|
-
end
|
244
|
-
|
245
259
|
def repeat(rule)
|
246
260
|
combinator = ""
|
247
261
|
min = max = 0
|
262
|
+
invalidate = rule.match(Regexp.new(@keys["keys"]["not"]))
|
263
|
+
rule = (!invalidate.eql?(nil)) ? rule[1..-1] : rule
|
248
264
|
repeater = rule.scan(Regexp.new(@keys["keys"]["repeat"]))[0]
|
249
265
|
if repeater
|
250
266
|
rule = rule.sub(repeater, "")
|
251
267
|
range = repeater.to_s[1..-2].split(":")
|
252
|
-
|
253
|
-
|
268
|
+
if @mode.eql?('strict') && invalidate
|
269
|
+
min = @fuzzer.random_number(0,min)
|
270
|
+
max = @fuzzer.random_number(min, rand(max + 9))
|
271
|
+
else
|
272
|
+
min = range[0].to_i()
|
273
|
+
max = range[1].to_i()
|
274
|
+
end
|
254
275
|
if min.eql?(max)
|
255
276
|
(0..max-1).each do | i |
|
256
277
|
combinator += decrypt(rule)
|
@@ -270,10 +291,12 @@ module Lightning
|
|
270
291
|
def escapable(rule)
|
271
292
|
escapes = rule.scan(Regexp.new(@keys["keys"]["escapable"]))
|
272
293
|
escapes.each do | escape |
|
273
|
-
if @
|
274
|
-
rule = rule.sub(escape,
|
294
|
+
if @mode.eql?('strict')
|
295
|
+
rule = rule.sub(escape, @fuzzer.random_character(1))
|
296
|
+
elsif escape[1..-1].eql?(@keys["keys"]["any"])
|
297
|
+
rule = rule.sub(escape, @fuzzer.random_character(1))
|
275
298
|
else
|
276
|
-
rule = rule.sub(escape,
|
299
|
+
rule = rule.sub(escape, escape[1..-1])
|
277
300
|
end
|
278
301
|
end
|
279
302
|
return decrypt(rule)
|
@@ -283,14 +306,14 @@ module Lightning
|
|
283
306
|
cortex = rule.scan(Regexp.new(@keys["keys"]["memorize"]))
|
284
307
|
bank = rule.split("+:")
|
285
308
|
hash = Digest::SHA256.hexdigest(bank[1])
|
286
|
-
memory = @
|
309
|
+
memory = @thoughts[hash]
|
287
310
|
if memory
|
288
311
|
return memory
|
289
312
|
else
|
290
313
|
rule = decrypt(bank[0])
|
291
|
-
|
292
|
-
@
|
293
|
-
return
|
314
|
+
thought = decrypt(bank[0])
|
315
|
+
@thoughts[hash] = thought
|
316
|
+
return thought
|
294
317
|
end
|
295
318
|
end
|
296
319
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'securerandom'
|
2
2
|
module Lightning
|
3
3
|
module Bolt
|
4
4
|
class Cypher
|
@@ -29,7 +29,7 @@ module Lightning
|
|
29
29
|
@reports.each do | report |
|
30
30
|
if report["key"].eql?(pin)
|
31
31
|
data = report["cypher"]
|
32
|
-
xrand =
|
32
|
+
xrand = SecureRandom.random_number(data.size)
|
33
33
|
value = data[xrand]
|
34
34
|
end
|
35
35
|
end
|
@@ -12,11 +12,15 @@ module Lightning
|
|
12
12
|
return SecureRandom.random_number(max-min)+min
|
13
13
|
end
|
14
14
|
|
15
|
-
def random_character(
|
15
|
+
def random_character(size)
|
16
16
|
enigma = ""
|
17
|
-
(
|
18
|
-
|
17
|
+
while (enigma.size < size + 1)
|
18
|
+
char = @alphabet[random_number(0,@alphabet.size)]
|
19
|
+
if char
|
20
|
+
enigma += char
|
21
|
+
end
|
19
22
|
end
|
23
|
+
return enigma
|
20
24
|
end
|
21
25
|
|
22
26
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lightning-bolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Vecchio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -109,9 +109,6 @@ files:
|
|
109
109
|
- lib/lightning/bolt/templates/payload.yml
|
110
110
|
- lib/lightning/bolt/version.rb
|
111
111
|
- lightning-bolt.gemspec
|
112
|
-
- specs/baseline.yml
|
113
|
-
- specs/checkpoints.rb
|
114
|
-
- specs/payload.yml
|
115
112
|
homepage: https://github.com/avecchio/lightning-bolt
|
116
113
|
licenses:
|
117
114
|
- MIT
|
data/specs/baseline.yml
DELETED
@@ -1,79 +0,0 @@
|
|
1
|
-
baselines:
|
2
|
-
- theorem: "birth_date"
|
3
|
-
regex: ""
|
4
|
-
- theorem: "birth_date_range"
|
5
|
-
regex: ""
|
6
|
-
- theorem: "birth_date_month"
|
7
|
-
regex: ""
|
8
|
-
- theorem: "birth_date_feburary"
|
9
|
-
regex: ""
|
10
|
-
- theorem: "birth_date_days_thirty_even"
|
11
|
-
regex: ""
|
12
|
-
- theorem: "birth_date_days_thirty_odd"
|
13
|
-
regex: ""
|
14
|
-
- theorem: "birth_date_norange"
|
15
|
-
regex: ""
|
16
|
-
- theorem: "birth_date_delimiter"
|
17
|
-
regex: ""
|
18
|
-
- theorem: "birth_year"
|
19
|
-
regex: ""
|
20
|
-
- theorem: "time_year"
|
21
|
-
regex: ""
|
22
|
-
- theorem: "us_dollar"
|
23
|
-
regex: ""
|
24
|
-
- theorem: "time_month_numeric"
|
25
|
-
regex: ""
|
26
|
-
- theorem: "time_day_numeric"
|
27
|
-
regex: ""
|
28
|
-
- theorem: "states"
|
29
|
-
regex: ""
|
30
|
-
- theorem: "email"
|
31
|
-
regex: ""
|
32
|
-
- theorem: "website"
|
33
|
-
regex: ""
|
34
|
-
- theorem: "website_domain"
|
35
|
-
regex: ""
|
36
|
-
- theorem: "dot_name"
|
37
|
-
regex: ""
|
38
|
-
- theorem: "dash_name"
|
39
|
-
regex: ""
|
40
|
-
- theorem: "full_name"
|
41
|
-
regex: ""
|
42
|
-
- theorem: "english_first_name"
|
43
|
-
regex: ""
|
44
|
-
- theorem: "english_last_name"
|
45
|
-
regex: ""
|
46
|
-
- theorem: "french_first_name"
|
47
|
-
regex: ""
|
48
|
-
- theorem: "french_last_name"
|
49
|
-
regex: ""
|
50
|
-
- theorem: "italian_first_name"
|
51
|
-
regex: ""
|
52
|
-
- theorem: "italian_last_name"
|
53
|
-
regex: ""
|
54
|
-
- theorem: "hexadecimal"
|
55
|
-
regex: ""
|
56
|
-
- theorem: "ipv4"
|
57
|
-
regex: ""
|
58
|
-
- theorem: "ipv6"
|
59
|
-
regex: ""
|
60
|
-
- theorem: "social_security_number"
|
61
|
-
regex: ""
|
62
|
-
- theorem: "geolocation_latitude"
|
63
|
-
regex: ""
|
64
|
-
- theorem: "geolocation_longitude"
|
65
|
-
regex: ""
|
66
|
-
- theorem: "numeric_float_signed"
|
67
|
-
regex: ""
|
68
|
-
- theorem: "us_address"
|
69
|
-
regex: ""
|
70
|
-
- theorem: "us_city"
|
71
|
-
regex: ""
|
72
|
-
- theorem: "us_state"
|
73
|
-
regex: ""
|
74
|
-
- theorem: "us_zipcode"
|
75
|
-
regex: ""
|
76
|
-
- theorem: "us_phone_number"
|
77
|
-
regex: ""
|
78
|
-
- theorem: "international_phone_number"
|
79
|
-
regex: ""
|
data/specs/checkpoints.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require_relative "../lib/lightning/bolt/codex"
|
2
|
-
require 'yaml'
|
3
|
-
|
4
|
-
baseline_theorems = YAML.load_file("./baseline.yml")["baselines"] | []
|
5
|
-
|
6
|
-
bookstore = "#{Dir.pwd}/../lib/lightning/bolt/templates/codex/"
|
7
|
-
payload = YAML.load_file("./payload.yml")
|
8
|
-
memory = []
|
9
|
-
|
10
|
-
codex = Lightning::Bolt::Codex.new(bookstore, payload["theorems"], payload["reports"], memory)
|
11
|
-
(0..0).each do | iteration |
|
12
|
-
baseline_theorems.each do | theorem |
|
13
|
-
puts "theorem: #{theorem["theorem"]}"
|
14
|
-
passable_theorem = codex.signal(true, false, theorem["theorem"])
|
15
|
-
#nonpassable_theorem = codex.signal(false, false, theorem["theorem"])
|
16
|
-
puts "passable"
|
17
|
-
puts passable_theorem#.scan(Regexp.new(theorem["regex"]))
|
18
|
-
# puts "nonpassable"
|
19
|
-
# puts nonpassable_theorem#.scan(Regexp.new(theorem["regex"]))
|
20
|
-
puts "------------"
|
21
|
-
end
|
22
|
-
end
|
data/specs/payload.yml
DELETED
@@ -1,116 +0,0 @@
|
|
1
|
-
---
|
2
|
-
theorems:
|
3
|
-
- name: "birth_date"
|
4
|
-
path: "#:identification-birth-date"
|
5
|
-
path: "#:identification-birth-date-range|#:identification-birth-date-norange"
|
6
|
-
- name: "birth_date_range"
|
7
|
-
path: "#:identification-birth-date-range"
|
8
|
-
rule: "#:birth-date-month&#:identification-birth-date-delimiter&#:identification-birth-year"
|
9
|
-
- name: "birth_date_month"
|
10
|
-
path: "#:birth-date-month"
|
11
|
-
rule: "(#:birth-date-feburary|#:birth-date-days-thirty-even|#:birth-date-days-thirty-odd)"
|
12
|
-
- name: "birth_date_feburary"
|
13
|
-
path: "#:birth-date-feburary"
|
14
|
-
rule: "(2#:identification-birth-date-delimiter[0..29])"
|
15
|
-
- name: "birth_date_days_thirty_even"
|
16
|
-
path: "#:birth-date-days-thirty-even"
|
17
|
-
rule: "((4|6|9|11)#:identification-birth-date-delimiter[0..30])"
|
18
|
-
- name: "birth_date_days_thirty_odd"
|
19
|
-
path: "#:birth-date-days-thirty-odd"
|
20
|
-
rule: "((1|3|5|7|8|10|12)#:identification-birth-date-delimiter[0..31])"
|
21
|
-
- name: "birth_date_norange"
|
22
|
-
path: "#:identification-birth-date-norange"
|
23
|
-
rule: "((2(([0-1][0-9])|(2[0-9])))|((1|3|5|7|8|10|12)&(([0-2])|([0-2][0-9])))|((4|6|9|11)[0..30]))"
|
24
|
-
- name: "birth_date_delimiter"
|
25
|
-
path: "#:identification-birth-date-delimiter"
|
26
|
-
rule: "/"
|
27
|
-
- name: "birth_year"
|
28
|
-
path: "#:identification-birth-year"
|
29
|
-
rule: "(19[0-9][0-9])|(20[0-1][0-9])|(20[0-1][6])"
|
30
|
-
- name: "time_year"
|
31
|
-
path: "#:time-year"
|
32
|
-
rule: "[0-9]{4:4}"
|
33
|
-
- name: "us_dollar"
|
34
|
-
path: "#:en-us-dollar"
|
35
|
-
rule: "$([0-9]{0:2}),([1-9]{3:3})\\.[0-9][0-9]"
|
36
|
-
- name: "time_month_numeric"
|
37
|
-
path: "#:time-month-numeric"
|
38
|
-
rule: "([1..12])|((0[0-9])|1(0-2))"
|
39
|
-
- name: "time_day_numeric"
|
40
|
-
path: "#:time-day-numeric"
|
41
|
-
rule: "([1..31])|(([0-2][0-9])|(3[01]))"
|
42
|
-
- name: "identification-email"
|
43
|
-
path: "#:profile-email"
|
44
|
-
rule: "#:name-dot@#:organization-website"
|
45
|
-
- name: "identification-website"
|
46
|
-
path: "#:organization-website"
|
47
|
-
rule: "@:en-organizations\\.#:names-domain"
|
48
|
-
- name: "website_domain"
|
49
|
-
path: "#:names-domain"
|
50
|
-
rule: "(org|com|net|)"
|
51
|
-
- name: "dot_name"
|
52
|
-
path: "#:name-dot"
|
53
|
-
rule: "((#:en-first-name)&(\\.)&(#:en-last-name)|(#:fr-first-name)&(\\.)&(#:fr-last-name)|(#:it-first-name)&(\\.)&(#:it-last-name))"
|
54
|
-
- name: "dash_name"
|
55
|
-
path: "#:name-dash"
|
56
|
-
rule: "((#:en-first-name\\-#:en-last-name)|(#:fr-first-name\\-#:fr-last-name)|(#:it-first-name\\-#:it-last-name))"
|
57
|
-
- name: "full_name"
|
58
|
-
path: "#:name-full"
|
59
|
-
rule: "((#:en-first-name #:en-last-name)|(#:fr-first-name #:fr-last-name)|(#:it-first-name #:it-last-name))"
|
60
|
-
- name: "english_first_name"
|
61
|
-
path: "#:en-first-name"
|
62
|
-
rule: "@:en-names-first"
|
63
|
-
- name: "english_last_name"
|
64
|
-
path: "#:en-last-name"
|
65
|
-
rule: "@:en-names-last"
|
66
|
-
- name: "french_first_name"
|
67
|
-
path: "#:fr-first-name"
|
68
|
-
rule: "@:fr-names-first"
|
69
|
-
- name: "french_last_name"
|
70
|
-
path: "#:fr-last-name"
|
71
|
-
rule: "@:fr-names-last"
|
72
|
-
- name: "italian_first_name"
|
73
|
-
path: "#:it-first-name"
|
74
|
-
rule: "@:it-names-first"
|
75
|
-
- name: "italian_last_name"
|
76
|
-
path: "#:it-last-name"
|
77
|
-
rule: "@:it-names-last"
|
78
|
-
- name: "hexadecimal"
|
79
|
-
path: "#:numeric-base-sixteen"
|
80
|
-
rule: "[0-9a-f]"
|
81
|
-
- name: "ipv4"
|
82
|
-
path: "#:technology-internet-ipv4"
|
83
|
-
rule: "(((([0-1][0-9][0-9])|(2([0-4][0-9]|5[0-5])))|(2[0..55]))\\.{3:3})&((([0-1][0-9][0-9])|(2([0-4][0-9]|5[0-5])))|(2[0..55]))"
|
84
|
-
- name: "ipv6"
|
85
|
-
path: "#:technology-internet-ipv6"
|
86
|
-
rule: "((#:numeric-base-sixteen{4:4}):{7:7})(#:numeric-base-sixteen{4:4})"
|
87
|
-
- name: "social_security_number"
|
88
|
-
path: "#:identification-socialsecuritynumber"
|
89
|
-
rule: "([0-9]{3:3})\\-([0-9]{2:2})\\-([0-9]{4:4})"
|
90
|
-
- name: "geolocation_latitude"
|
91
|
-
path: "#:geolocation-latitude"
|
92
|
-
rule: "#:numeric-float-signed"
|
93
|
-
- name: "geolocation_longitude"
|
94
|
-
path: "#:geolocation-longitude"
|
95
|
-
rule: "#:numeric-float-signed"
|
96
|
-
- name: "numeric_float_signed"
|
97
|
-
path: "#:numeric-float-signed"
|
98
|
-
rule: "(\\+|\\-)[0..65536]\\.[0..65536]"
|
99
|
-
- name: "us_address"
|
100
|
-
path: "#:identification-us-address"
|
101
|
-
rule: "[0..99999] @:"
|
102
|
-
- name: "us_city"
|
103
|
-
path: "#:identification-us-city"
|
104
|
-
rule: "@:en-us-cities"
|
105
|
-
- name: "us_state"
|
106
|
-
path: "#:identification-us-state"
|
107
|
-
rule: "@:en-us-states"
|
108
|
-
- name: "us_zipcode"
|
109
|
-
path: "#:identification-us-zipcode"
|
110
|
-
rule: "[0-9]{5:5}"
|
111
|
-
- name: "us_phone_number"
|
112
|
-
path: "#:identification-us-phonenumber"
|
113
|
-
rule: "[1-9][1-9][1-9]\\-[1-9][1-9][1-9]\\-[1-9][1-9][1-9][1-9]"
|
114
|
-
- name: "international_phone_number"
|
115
|
-
path: "#:identification-international-phonenumber"
|
116
|
-
rule: "hi"
|