Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DCSG2900-ThreatTotal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Barstad
DCSG2900-ThreatTotal
Commits
16aa1296
Commit
16aa1296
authored
May 10, 2022
by
Odin K. Henriksen
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix unexpected hybridanalysis return
parent
a5093c9a
No related branches found
No related tags found
1 merge request
!2
Merge react-branch into main.
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/validation.go
+8
-8
8 additions, 8 deletions
utils/validation.go
with
8 additions
and
8 deletions
utils/validation.go
+
8
−
8
View file @
16aa1296
...
...
@@ -88,10 +88,10 @@ func SetResponeObjectVirusTotal(jsonResponse HybridAnalysisURL, VirusTotal *Fron
if
jsonResponse
.
Scanners
[
0
]
.
Status
==
"clean"
{
VirusTotal
.
EN
.
Status
=
"Safe"
VirusTotal
.
EN
.
Content
=
"VirusTotal
has no information that indicates this URL is malicious"
VirusTotal
.
EN
.
Content
=
fmt
.
Sprintf
(
"%s
has no information that indicates this URL is malicious"
,
jsonResponse
.
Scanners
[
0
]
.
Name
)
VirusTotal
.
NO
.
Status
=
"Trygg"
VirusTotal
.
NO
.
Content
=
"VirusTotal
har ingen informasjon som tilsier at denne URL'en er skadelig."
VirusTotal
.
NO
.
Content
=
fmt
.
Sprintf
(
"%s
har ingen informasjon som tilsier at denne URL'en er skadelig."
,
jsonResponse
.
Scanners
[
0
]
.
Name
)
}
else
if
jsonResponse
.
Scanners
[
0
]
.
Status
==
"malicious"
{
VirusTotal
.
EN
.
Status
=
"Risk"
VirusTotal
.
EN
.
Content
=
fmt
.
Sprintf
(
"%d / %d Antivirus agents has detected this URL/Domain as malicious"
,
jsonResponse
.
Scanners
[
0
]
.
Positives
,
jsonResponse
.
Scanners
[
0
]
.
Total
)
...
...
@@ -108,10 +108,10 @@ func SetResponeObjectVirusTotal(jsonResponse HybridAnalysisURL, VirusTotal *Fron
}
else
if
jsonResponse
.
Scanners
[
0
]
.
Status
==
"no-result"
{
VirusTotal
.
EN
.
Status
=
"Safe"
VirusTotal
.
EN
.
Content
=
"VirusTotal
has no information that indicates this URL is malicious"
VirusTotal
.
EN
.
Content
=
fmt
.
Sprintf
(
"%s
has no information that indicates this URL is malicious"
,
jsonResponse
.
Scanners
[
0
]
.
Name
)
VirusTotal
.
NO
.
Status
=
"Trygg"
VirusTotal
.
NO
.
Content
=
"VirusTotal
har ingen informasjon som tilsier at denne URL'en er skadelig."
VirusTotal
.
NO
.
Content
=
fmt
.
Sprintf
(
"%s
har ingen informasjon som tilsier at denne URL'en er skadelig."
,
jsonResponse
.
Scanners
[
0
]
.
Name
)
}
else
{
VirusTotal
.
EN
.
Status
=
"Error"
...
...
@@ -123,16 +123,16 @@ func SetResponeObjectUrlscanio(jsonResponse HybridAnalysisURL, urlscanio *Fronte
if
jsonResponse
.
Scanners
[
1
]
.
Status
==
"clean"
||
jsonResponse
.
Scanners
[
1
]
.
Status
==
"no-classification"
{
urlscanio
.
EN
.
Status
=
"Safe"
urlscanio
.
EN
.
Content
=
"Urlscan
has no information that indicates this URL is malicious"
urlscanio
.
EN
.
Content
=
fmt
.
Sprintf
(
"%s
has no information that indicates this URL is malicious"
,
jsonResponse
.
Scanners
[
1
]
.
Name
)
urlscanio
.
NO
.
Status
=
"Trygg"
urlscanio
.
NO
.
Content
=
"Urlscan
har ingen informasjon som tilsier at denne URL'en er skadelig."
urlscanio
.
NO
.
Content
=
fmt
.
Sprintf
(
"%s
har ingen informasjon som tilsier at denne URL'en er skadelig."
,
jsonResponse
.
Scanners
[
1
]
.
Name
)
}
else
if
jsonResponse
.
Scanners
[
1
]
.
Status
==
"malicious"
{
urlscanio
.
EN
.
Status
=
"Risk"
urlscanio
.
EN
.
Content
=
"Urlscan
has detected this URL/Domain as malicious"
urlscanio
.
EN
.
Content
=
fmt
.
Sprintf
(
"%s
has detected this URL/Domain as malicious"
,
jsonResponse
.
Scanners
[
1
]
.
Name
)
urlscanio
.
NO
.
Status
=
"Utrygg"
urlscanio
.
NO
.
Content
=
"Urlscan
har detektert denne URLen / domenet som skadelig"
urlscanio
.
NO
.
Content
=
fmt
.
Sprintf
(
"%s
har detektert denne URLen / domenet som skadelig"
,
jsonResponse
.
Scanners
[
1
]
.
Name
)
}
else
if
jsonResponse
.
Scanners
[
1
]
.
Status
==
"in-queue"
{
urlscanio
.
EN
.
Status
=
"Awaiting analysis"
urlscanio
.
EN
.
Content
=
"Awaiting analysis"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment