Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Warden Connectors
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Warden
Warden Connectors
Commits
4e1ad1cc
Commit
4e1ad1cc
authored
9 years ago
by
Pavel Kácha
Browse files
Options
Downloads
Patches
Plain Diff
Python 3 str/bytes compatibility fixes
parent
38872f06
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
intelmq/bots/experts/idea/expert.py
+5
-3
5 additions, 3 deletions
intelmq/bots/experts/idea/expert.py
with
5 additions
and
3 deletions
intelmq/bots/experts/idea/expert.py
+
5
−
3
View file @
4e1ad1cc
...
...
@@ -6,14 +6,16 @@ from collections import Sequence, Mapping
from
base64
import
b64decode
from
uuid
import
uuid4
if
version_info
>=
(
3
,
0
):
from
urllib.parse
import
quote_plus
as
quot
from
urllib.parse
import
quote_plus
basestring
=
str
else
:
from
urllib
import
quote_plus
as
quot
from
urllib
import
quote_plus
from
intelmq.lib.bot
import
Bot
from
intelmq.lib.message
import
Event
def
quot
(
s
):
return
quote_plus
((
s
or
""
).
encode
(
"
UTF-8
"
))
def
get_value
(
src
,
value
):
try
:
...
...
@@ -133,7 +135,7 @@ translation = {
"
Ref
"
:
[
lambda
s
:
"
malware:
"
+
quot
(
s
[
"
malware.name
"
]
+
quot
(
s
.
get
(
"
malware.version
"
)))]
},
{
"
Content
"
:
lambda
s
:
b64decode
(
s
[
"
raw
"
]),
"
Content
"
:
lambda
s
:
b64decode
(
s
[
"
raw
"
])
.
decode
(
"
ISO-8859-1
"
)
,
"
Type
"
:
[
lambda
s
:
s
[
"
raw
"
]
and
"
OrigData
"
],
"
Ref
"
:
[
"
feed.url
"
]
}
...
...
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