Files
2026-04-05 15:33:42 -04:00

83 lines
6.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div v-if="activeTab === 'fuzzer'" class="tab-content">
<div class="transform-layout">
<div class="transform-section">
<div class="section-header">
<h3><i class="fas fa-bug"></i> Mutation Lab <small>mutate text into diverse payloads</small></h3>
</div>
<div class="input-section">
<label>
Base text
<textarea v-model="fuzzerInput" placeholder="Enter seed text to fuzz..." rows="3"></textarea>
</label>
</div>
<div v-if="fuzzerGetLexemeAnalysis().totalFindings" class="lexeme-analysis-card">
<div class="lexeme-analysis-header">
<div>
<div class="lexeme-analysis-kicker">Latin-Root Analysis</div>
<h4>{{ fuzzerGetLexemeAnalysis().summary }}</h4>
<p>This seed text contains loaded Latin-root wording. Neutralizing it here affects every generated mutation case.</p>
</div>
<button type="button" class="action-button copy lexeme-neutralize-btn" @click="fuzzerNeutralizeInput">
<i class="fas fa-seedling"></i> Neutralize flagged terms
</button>
</div>
<div class="lexeme-analysis-list">
<div v-for="finding in fuzzerGetLexemeAnalysis().findings" :key="finding.id" class="lexeme-analysis-item">
<div class="lexeme-analysis-item-top">
<div class="lexeme-analysis-term-group">
<code class="lexeme-term">{{ finding.term }}</code>
<span class="lexeme-chip">{{ finding.partOfSpeech }}</span>
<span class="lexeme-chip">{{ finding.family }}</span>
<span class="lexeme-chip">confidence {{ Math.round(finding.confidence * 100) }}%</span>
</div>
<div class="lexeme-analysis-domain">
<span v-if="finding.semanticDomain"><strong>Domain:</strong> {{ finding.semanticDomain }}</span>
<span v-else><strong>Domain:</strong> unresolved root</span>
</div>
</div>
<p class="lexeme-analysis-rationale">{{ finding.rationale }}</p>
<div class="lexeme-analysis-rewrites">
<button v-for="rewrite in finding.rewrites" :key="finding.id + '-' + rewrite" type="button" class="lexeme-rewrite-btn" @click="fuzzerApplyLexemeRewrite(finding.term, rewrite)">
{{ rewrite }}
</button>
</div>
</div>
</div>
</div>
<div class="options-grid">
<label>
Cases
<input type="number" v-model.number="fuzzerCount" min="1" max="500" />
</label>
<label>
Seed (optional)
<input type="text" v-model="fuzzerSeed" placeholder="e.g., 1337" />
</label>
</div>
<div class="options-grid">
<label class="switch neon"><input type="checkbox" v-model="fuzzUseRandomMix" /><span>Random Mix (transforms)</span></label>
<label class="switch neon"><input type="checkbox" v-model="fuzzZeroWidth" /><span>Zerowidth pepper</span></label>
<label class="switch neon"><input type="checkbox" v-model="fuzzUnicodeNoise" /><span>Unicode noise</span></label>
<label class="switch neon"><input type="checkbox" v-model="fuzzZalgo" /><span>Zalgo</span></label>
<label class="switch neon"><input type="checkbox" v-model="fuzzWhitespace" /><span>Whitespace chaos</span></label>
<label class="switch neon"><input type="checkbox" v-model="fuzzCasing" /><span>Casing chaos</span></label>
<label class="switch neon"><input type="checkbox" v-model="fuzzEncodeShuffle" /><span>Homoglyph confusables</span></label>
</div>
<div class="tool-toolbar">
<button type="button" class="transform-button tool-primary-btn" @click="generateFuzzCases"><i class="fas fa-hammer"></i> Generate Cases</button>
<button class="action-button copy" v-if="fuzzerOutputs.length" @click="copyAllFuzz"><i class="fas fa-copy"></i> Copy All</button>
<button class="action-button download" v-if="fuzzerOutputs.length" @click="downloadFuzz"><i class="fas fa-download"></i> Download</button>
</div>
<div class="output-container" v-if="fuzzerOutputs.length">
<div class="token-tiles fuzzer-list">
<div v-for="(out, i) in fuzzerOutputs" :key="'fz-'+i" class="token-chip fuzzer-case-row">
<span class="fuzzer-case-index">#{{ i+1 }}</span>
<textarea class="fuzzer-case-textarea" :value="out" readonly></textarea>
<button class="copy-button" @click="copyToClipboard(out)" title="Copy"><i class="fas fa-copy"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>