complete url verifications

This commit is contained in:
heyethereum
2024-08-13 21:03:15 +08:00
parent 63e2d299fd
commit 8665693642
3 changed files with 17 additions and 6 deletions

View File

@@ -432,11 +432,19 @@ public class URLVerificationService {
String category = predictionService.predict(urlModel);
//update in category in url table
urlModel.getDetails().setClassifications(category);
// return classification results
if (category.equals(CAT_BENIGN)) {
if (!urlModel.getDetails().getTrackingDescriptions().isEmpty()) {
if (!urlModel.getDetails().getTrackingDescriptions().isEmpty() || // contains tracking
urlModel.getData().getInfo().getPrefix().equalsIgnoreCase("http://") || // uses http
urlModel.getDetails().getSslStripping().contains(true) || // has SSL stripping
urlModel.getDetails().getHasExecutable().equalsIgnoreCase("yes") || // contains executable
!urlModel.getDetails().getJavascriptCheck().isEmpty() || // contains javascript
!urlModel.getDetails().getHasIpAddress().isEmpty() || // contains IP address
urlModel.getDetails().getHostnameEmbedding() != null // contains hostname embedding
) {
return CLASSIFY_WARNING;
}
return CLASSIFY_SAFE;