-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
108 lines (101 loc) · 6.98 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSV Fuzzer/Anonymizer</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<div class="container mt-5">
<div class="jumbotron">
<h1 style="font-size: 2em;" class="display-4">CSV Anonymizer</h1>
<p class="lead">Upload a CSV file to fuzz and anonymize its data with configurable options and presets.</p>
<hr class="my-4">
<div class="form-group">
<input type="file" class="form-control-file" id="csvFile" accept=".csv">
</div>
<button id="fuzzButton" class="btn btn-primary btn-lg" disabled>Fuzz & Anonymize</button>
<div class="mt-4">
<div class="form-group">
<label for="fuzzPreset">Fuzzing Preset:</label>
<select class="form-control" id="fuzzPreset">
<option value="custom">Custom</option>
<option value="mild">Mild Anonymization</option>
<option value="moderate">Moderate Anonymization</option>
<option value="aggressive">Aggressive Anonymization</option>
</select>
<small class="form-text text-muted">Choose a preset combination of fuzzing options.</small>
</div>
<button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#fuzzConfig" aria-expanded="false" aria-controls="fuzzConfig">
Advanced Fuzzing Configuration (Optional)
</button>
<div class="collapse" id="fuzzConfig">
<div class="card card-body mt-3">
<h4>Advanced Parameters</h4>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="redactNumbers">
<label class="form-check-label" for="redactNumbers">Redact Numbers</label>
<small class="form-text text-muted">Replace numbers with "REDACTED" instead of fuzzing.</small>
</div>
<div class="form-group">
<label for="numberFuzzFactor">Number Fuzz Factor:</label>
<input type="range" class="form-control-range" id="numberFuzzFactor" min="0" max="1" step="0.05" value="0.3">
<output for="numberFuzzFactor" id="numberFuzzFactorOutput">0.3</output>
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="redactDates">
<label class="form-check-label" for="redactDates">Redact Dates</label>
<small class="form-text text-muted">Replace dates with "REDACTED" instead of fuzzing.</small>
</div>
<div class="form-group">
<label for="dateVariationDays">Date Variation Range (Days):</label>
<input type="number" class="form-control" id="dateVariationDays" value="30">
<small class="form-text text-muted">+/- days to vary dates.</small>
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="redactStrings">
<label class="form-check-label" for="redactStrings">Redact Strings (General)</label>
<small class="form-text text-muted">Replace general strings with "REDACTED" instead of fuzzing.</small>
</div>
<div class="form-group">
<label for="stringFuzzProbability">String Fuzz Probability (General):</label>
<input type="range" class="form-control-range" id="stringFuzzProbability" min="0" max="1" step="0.05" value="0.5">
<output for="stringFuzzProbability" id="stringFuzzProbabilityOutput">0.5</output>
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="redactStringsLight">
<label class="form-check-label" for="redactStringsLight">Redact Strings (Light)</label>
<small class="form-text text-muted">Replace light strings (e.g., IDs) with "REDACTED" instead of fuzzing.</small>
</div>
<div class="form-group">
<label for="stringLightFuzzProbability">String Fuzz Probability (Light):</label>
<input type="range" class="form-control-range" id="stringLightFuzzProbability" min="0" max="1" step="0.05" value="0.15">
<output for="stringLightFuzzProbability" id="stringLightFuzzProbabilityOutput">0.15</output>
</div>
</div>
</div>
</div>
<div id="processingMessage" class="mt-3" style="display: none; color: grey;">Processing... Please wait.</div>
<div id="downloadLinkContainer" class="mt-4" style="display: none;">
<a id="downloadLink" class="btn btn-success btn-lg" download="fuzzed_data.csv">Download Fuzzed CSV</a>
</div>
<div id="errorMessage" class="mt-3 alert alert-danger" style="display: none;"></div>
<div id="info" style="margin-top: 15px;">
<small>This is a static HTML application running on your browser. If you prefer to use it offline just <a href="https://github.com/fabriziosalmi/csv-anonymizer/archive/refs/heads/main.zip">download</a> the application,
extract csv-anonymizer-main.zip somewhere and open the <b>index.html</b> file with your browser. Source code available on
<a href="https://github.com/fabriziosalmi/csv-anonymizer">
<i class="fab fa-github"></i> GitHub
</a>
</small>
</div>
</div>
</div>
<script src="script.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>