Skip to content

Implement quota insertion #3

@Splat

Description

@Splat

engine/modifiers/quoteinsert/quote_insertion.go needs to implement while matching to https://github.com/wietze/ArgFuscator.net/blob/main/src/Modifiers/QuoteInsertion.ts

Steps:

  1. Unmarshal cfg into a Config struct.
  2. Parse Config.Probability.
  3. For each eligible token:
    a. Roll rand.Float64(); if >= probability, leave token unchanged.
    b. Pick a random insertion position between 1 and len(runes)- 1 (avoid position 0 or end to keep the token visually meaningful).
    c. Pick a quote character at random: " or '.
    d. Insert "" (or ) at the chosen position.
  4. Return updated tokens.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions