</div>
<div class="col-lg-6">
<div class="card bg-light shadow card-body card p-2">
- <p>Learn Fuzzy storage:</p>
+ <p>Fuzzy hash storage management:</p>
<form class="d-flex">
<div class="d-flex align-items-center">
<label for="fuzzyFlagText">Flag:</label>
<label for="fuzzyWeightText">Weight:</label>
<input name="fuzzyWeightText" id="fuzzyWeightText" class="form-control ms-1" type="number" value="1"/>
</div>
- <button class="btn btn-warning ms-2 d-flex align-items-center" data-upload="fuzzy" disabled><i class="fas fa-upload me-2"></i>Upload FUZZY</button>
+ <button class="btn btn-warning ms-2 d-flex align-items-center" data-upload="fuzzyadd" disabled><i class="fas fa-circle-plus me-2"></i>Add hash</button>
+ <button class="btn btn-danger ms-2 d-flex align-items-center" data-upload="fuzzydel" disabled><i class="fas fa-trash-can me-2"></i>Delete hash</button>
</form>
</div>
</div>
url = "learnspam";
} else if (source === "ham") {
url = "learnham";
- } else if (source === "fuzzy") {
+ } else if (source === "fuzzyadd") {
url = "fuzzyadd";
+ } else if (source === "fuzzydel") {
+ url = "fuzzydel";
} else if (source === "scan") {
url = "checkv2";
}
getFuzzyHashes(data);
} else {
let headers = {};
- if (source === "fuzzy") {
+ if (source === "fuzzyadd") {
headers = {
flag: $("#fuzzyFlagText").val(),
weight: $("#fuzzyWeightText").val()
};
+ } else if (source === "fuzzydel") {
+ headers = {
+ flag: $("#fuzzyFlagText").val(),
+ };
}
uploadText(data, source, headers);
}