class Crowbar::Mutators::DictionaryMutator

Overview

Injects or replaces tokens from a configurable or built-in token vocabulary

Defined in:

crowbar/mutators/text.cr

Constant Summary

DEFAULT_TOKENS = ["null", "nil", "true", "false", "undefined", "NaN", "Infinity", "0", "1", "-1", "undefined", "None", "GET", "POST", "PUT", "DELETE", "OPTIONS", "application/json", "text/html", "multipart/form-data", "localhost", "127.0.0.1", "::1", "0.0.0.0", "admin", "root", "guest", "anonymous", "Bearer", "Basic", "token", "password", "<?xml", "<!DOCTYPE", "<html", "<script"]

Constructors

Instance Method Summary

Instance methods inherited from class Crowbar::Mutator

adjust_score(delta : Int32) adjust_score, aliases : Array(String) aliases, description : String description, effective_weight : Float64 effective_weight, mutate(context : Context, buffer : Buffer, target_range : Tuple(Int32, Int32) | Nil = nil) : Tuple(Bool, Int32) mutate, name : String name, score : Int32 score, score=(score : Int32) score=, weight : Float64 weight, weight=(weight : Float64) weight=

Constructor methods inherited from class Crowbar::Mutator

new(weight : Float64 = 1.0) new

Constructor Detail

def self.new(custom_tokens : Array(String) | Nil = nil, weight : Float64 = 1.0) #

Instance Method Detail

def add_tokens(new_tokens : Iterable(String)) #

def description : String #

def mutate(context : Context, buffer : Buffer, target_range : Tuple(Int32, Int32) | Nil = nil) : Tuple(Bool, Int32) #

def name : String #

def tokens : Array(String) #

def tokens=(tokens : Array(String)) #