Instruction stringlengths 362 7.83k | output_code stringlengths 1 945 |
|---|---|
Continue the code snippet: <|code_start|>
approach = Group(
murta2014a, pimentel2015a,
_display="no Work flow",
_approach_name="noWorkflow",
<|code_end|>
. Use current file imports:
from snowballing.approaches import Group
from ..constants import *
from ...work.y2014 import murta2014a
from ...work.y201... | _cite=False, |
Based on the snippet: <|code_start|>
CiSE = journal("CiSE", "Computing in Science & Engineering")
ICSE = conference("ICSE", "International Conference on Software Engineering")
IPAW = conference("IPAW", "International Provenance and Annotation Workshop")
<|code_end|>
, predict the immediate next line with the help of im... | TaPP = conference("TaPP", "Workshop on the Theory and Practice of Provenance") |
Next line prediction: <|code_start|># coding: utf-8
dbindex.last_citation_file = dbindex.this_file(__file__)
DB(Citation(
murta2014a, freire2008a, ref="[5]",
contexts=[
"There are two types of provenance for scientific workflows: prospective and retrospective [5]. Prospective provenance describes the ... | ], |
Here is a snippet: <|code_start|># coding: utf-8
dbindex.last_citation_file = dbindex.this_file(__file__)
DB(Citation(
murta2014a, freire2008a, ref="[5]",
contexts=[
"There are two types of provenance for scientific workflows: prospective and retrospective [5]. Prospective provenance describes the str... | )) |
Given the following code snippet before the placeholder: <|code_start|># coding: utf-8
dbindex.last_citation_file = dbindex.this_file(__file__)
DB(Citation(
murta2014a, freire2008a, ref="[5]",
contexts=[
"There are two types of provenance for scientific workflows: prospective and retrospective [5]. Pr... | contexts=[ |
Based on the snippet: <|code_start|># coding: utf-8
dbindex.last_citation_file = dbindex.this_file(__file__)
DB(Citation(
murta2014a, freire2008a, ref="[5]",
contexts=[
"There are two types of provenance for scientific workflows: prospective and retrospective [5]. Prospective provenance describes the ... | ], |
Based on the snippet: <|code_start|>
def add(self, key, value):
return self.add_all(key, {value})
def replace(self, key, values):
if not self._enabled:
return self
self.rules[key] = values
return self
def old_form_to_new(show_deprecation=False):
if show_depreca... | For obtaining an equivalent form definition, run: |
Continue the code snippet: <|code_start|>
def prepend(self, key, value):
return self.prepend_all(key, [value])
def add_all(self, key, values):
if not self._enabled:
return self
if key not in self.rules:
self.rules[key] = set()
for value in values:
... | * config.FORM_TEXT_FIELDS |
Predict the next line for this snippet: <|code_start|> return self.add_all(key, {value})
def replace(self, key, values):
if not self._enabled:
return self
self.rules[key] = values
return self
def old_form_to_new(show_deprecation=False):
if show_deprecation:
... | from snowballing.rules import old_form_to_new |
Continue the code snippet: <|code_start|> self.rules[key] = set()
for value in values:
self.rules[key].add(value)
return self
def add(self, key, value):
return self.add_all(key, {value})
def replace(self, key, values):
if not self._enabled:
re... | 'events': ..., |
Given snippet: <|code_start|>
approach = Group(
murta2014a, pimentel2015a,
display="no Work flow",
approach_name="noWorkflow",
_cite=False,
_meta=[dict(
target=PYTHON,
)],
_about="""
<p>
noWorkflow (<a href="#murta2014a" class="reference">murta2014a</a>; <a h... | <span class="collection"> |
Given snippet: <|code_start|>
approach = Group(
murta2014a, pimentel2015a,
display="no Work flow",
approach_name="noWorkflow",
_cite=False,
_meta=[dict(
target=PYTHON,
)],
_about="""
<p>
<|code_end|>
, continue by predicting the next line. Consider current file imports:
... | noWorkflow (<a href="#murta2014a" class="reference">murta2014a</a>; <a href="#pimentel2015a" class="reference">pimentel2015a</a>) captures provenance from Python scripts for <span class="goal">comprehension</span>. |
Based on the snippet: <|code_start|>
approach = Group(
murta2014a, pimentel2015a,
display="no Work flow",
approach_name="noWorkflow",
_cite=False,
_meta=[dict(
target=PYTHON,
)],
<|code_end|>
, predict the immediate next line with the help of imports:
from snowballing.approaches im... | _about=""" |
Given the code snippet: <|code_start|># coding: utf-8
dbindex.last_citation_file = dbindex.this_file(__file__)
DB(Citation(
murta2014a, freire2008a, ref="5",
contexts=[
"There are two types of provenance for scientific workflows: prospective and retrospective [5]. Prospective provenance describes the ... | )) |
Based on the snippet: <|code_start|># coding: utf-8
dbindex.last_citation_file = dbindex.this_file(__file__)
DB(Citation(
murta2014a, freire2008a, ref="5",
contexts=[
"There are two types of provenance for scientific workflows: prospective and retrospective [5]. Prospective provenance describes the st... | ], |
Given snippet: <|code_start|># coding: utf-8
dbindex.last_citation_file = dbindex.this_file(__file__)
DB(Citation(
murta2014a, freire2008a, ref="5",
contexts=[
"There are two types of provenance for scientific workflows: prospective and retrospective [5]. Prospective provenance describes the structure... | contexts=[ |
Next line prediction: <|code_start|># coding: utf-8
dbindex.last_citation_file = dbindex.this_file(__file__)
DB(Citation(
murta2014a, freire2008a, ref="5",
contexts=[
"There are two types of provenance for scientific workflows: prospective and retrospective [5]. Prospective provenance describes the st... | )) |
Given snippet: <|code_start|>
def hooks(display_step, last_step, batch_size, loss, accuracy):
return [
tf.train.StopAtStepHook(last_step=last_step),
<|code_end|>
, continue by predicting the next line. Consider current file imports:
import tensorflow as tf
from .logger import (StepLoggerHook,
... | tf.train.NanTensorHook(loss), |
Using the snippet: <|code_start|>from __future__ import print_function
class StepLoggerHook(LoggerHook):
def __init__(self, display_step, last_step):
<|code_end|>
, determine the next line of code. You have imports:
from .logger import LoggerHook
and context (class names, function names, or code) available:
... | super().__init__(display_step) |
Given snippet: <|code_start|>from __future__ import print_function
class TimeLoggerHook(LoggerHook):
def __init__(self, display_step, batch_size, last_step):
super().__init__(display_step)
self._batch_size = batch_size
self._last_step = last_step
def before_display_step_run(self, ... | '[{:.1f} examples/sec'.format(examples_per_sec), |
Based on the snippet: <|code_start|>
class SlicTest(tf.test.TestCase):
def test_slic(self):
image = tf.constant([
[[255, 255, 255], [255, 255, 255], [0, 0, 0], [0, 0, 0]],
[[255, 255, 255], [255, 255, 255], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [255, 255, 255],... | [0, 0, 1, 1], |
Given snippet: <|code_start|>
class SlicoTest(tf.test.TestCase):
def test_slico(self):
image = tf.constant([
[[255, 255, 255], [255, 255, 255], [0, 0, 0], [0, 0, 0]],
[[255, 255, 255], [255, 255, 255], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [255, 255, 255], [255... | with self.test_session() as sess: |
Given snippet: <|code_start|>
class FelzenszwalbTest(tf.test.TestCase):
def test_felzenszwalb(self):
image = tf.constant([
[[255, 255, 255], [255, 255, 255], [0, 0, 0], [0, 0, 0]],
[[255, 255, 255], [255, 255, 255], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [255, 2... | [0, 0, 0, 0], |
Next line prediction: <|code_start|>from __future__ import division
class AdjacencyTest(tf.test.TestCase):
def test_adjacency_unweighted(self):
segmentation = tf.constant([
[0, 0, 1, 1],
[0, 0, 0, 1],
[2, 0, 0, 3],
[2, 2, 3, 3],
], dtype=tf.int32)... | [1, 1, 1, 0], |
Using the snippet: <|code_start|>
with self.test_session() as sess:
adjacency_matrix = adjacency_unweighted(segmentation)
self.assertAllEqual(adjacency_matrix.eval(), expected)
def test_adjacency_euclidean_distance(self):
segmentation = tf.constant([
[0, 0, 1, 1]... | with self.test_session() as sess: |
Given snippet: <|code_start|>
class QuickshiftTest(tf.test.TestCase):
def test_quickshift(self):
image = tf.constant([
[[255, 255, 255], [255, 255, 255], [0, 0, 0], [0, 0, 0]],
[[255, 255, 255], [255, 255, 255], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [255, 255, ... | expected = [ |
Here is a snippet: <|code_start|>
with self.test_session() as sess:
neighborhoods = neighborhoods_weights_to_root(
adjacency, sequence, size)
self.assertAllEqual(neighborhoods.eval(), expected)
def test_grid_spiral(self):
sequence = tf.constant([5, 6])
... | ] |
Given the code snippet: <|code_start|> neighborhoods = neighborhoods_weights_to_root(
adjacency, sequence, size)
self.assertAllEqual(neighborhoods.eval(), expected)
def test_grid_spiral(self):
sequence = tf.constant([5, 6])
# 3x4 Grid
adjacency = tf.c... | with self.test_session() as sess: |
Based on the snippet: <|code_start|>from __future__ import print_function
class MemoryLoggerHook(LoggerHook):
def __init__(self, display_step):
super().__init__(display_step)
def after_display_step_run(self, run_context, run_values):
<|code_end|>
, predict the immediate next line with the help of ... | memory = (self.process.get_memory_info()[0] / float(2 ** 20)) |
Given the code snippet: <|code_start|>from __future__ import print_function
class AccuracyLoggerHook(LoggerHook):
def __init__(self, display_step, accuracy):
super().__init__(display_step)
self._accuracy = accuracy
def before_display_step_run(self, run_context):
return tf.train.Se... | print(s, end=' ') |
Given snippet: <|code_start|>
class FeaturesTest(tf.test.TestCase):
def test_features(self):
image = tf.constant([
[[255, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [255, 255, 255]],
[[255, 255, 255], [255, 255, 255], [255, 255, 255... | [0, 0, 0], |
Given snippet: <|code_start|> [0, 0, 0, 1, 1, 0, 0],
[0, 0, 0, 1, 0, 0, 0],
])
labels = tf.constant([1, 2, 3, 4, 5, 6, 7])
expected = [4, 3, 2, 6, 5, 1, 7]
with self.test_session() as sess:
labeling = betweenness_centrality(adjacency, labels)
... | self.assertAllEqual(labeling.eval(), expected) |
Next line prediction: <|code_start|> [1, 0, 0, 0, 0, 0, 0, 1],
[1, 1, 1, 1, 0, 0, 0, 0],
[0, 1, 0, 1, 0, 0, 0, 0],
[0, 0, 1, 0, 1, 0, 0, 0],
])
labels = tf.constant([1, 2, 3, 4, 5, 6, 7, 8])
expected = [4, 7, 5, 8, 6, 2, 1, 3]
with self.t... | self.assertAllEqual(labeling.eval(), expected) |
Given snippet: <|code_start|>
class MultipartFormdataEncoder:
def __init__(self):
self.boundary = uuid.uuid4().hex
self.content_type = 'multipart/form-data; boundary={}'.format(self.boundary)
@classmethod
<|code_end|>
, continue by predicting the next line. Consider current file imports:
imp... | def u(cls, s): |
Based on the snippet: <|code_start|>
# test for forms
class CommentFormTest(TestCase):
def test_comment_forms(self):
form_data = {
'comment_content' : 'comment'
}
form = CommentForm(data=form_data)
self.assertTrue(form.is_valid())
class ThreadFormTest(TestCase):
d... | 'forum_title' : 'title', |
Given the code snippet: <|code_start|>
# test for forms
class CommentFormTest(TestCase):
def test_comment_forms(self):
form_data = {
'comment_content' : 'comment'
}
form = CommentForm(data=form_data)
self.assertTrue(form.is_valid())
class ThreadFormTest(TestCase):
... | 'forum_title' : 'title', |
Predict the next line for this snippet: <|code_start|>
class ForumModelTestCase(TestCase):
def test_forum_model_str_method(self):
forum = Forum(forum_title='Example')
self.assertEqual(str(forum), 'Example')
def test_verbose_name_plural(self):
self.assertEqual(str(Forum._meta.verbose_... | def test_verbose_name_plural(self): |
Given the code snippet: <|code_start|>
class ForumModelTestCase(TestCase):
def test_forum_model_str_method(self):
forum = Forum(forum_title='Example')
self.assertEqual(str(forum), 'Example')
<|code_end|>
, generate the next line using the imports in this file:
from django.test import TestCase
f... | def test_verbose_name_plural(self): |
Given snippet: <|code_start|>
request = self.factory.post(path=url, data=payload)
request.user = user
response = author_edit_view(request, user.profile.slug)
response.client = Client()
self.assertRedirects(
response, reverse('author:author_single', args=[user.profile.... | username='john', |
Continue the code snippet: <|code_start|> user = User.objects.create_user(
username='john',
email='john.doe@gmail.com',
password='testing123',
)
url = reverse('author:author_single', args=[user.profile.slug])
request = self.factory.get(path=url)
... | self.assertRedirects( |
Given the following code snippet before the placeholder: <|code_start|>
@ast_node
class AutoVectorStatement(ASTNode):
"""An auto variable is automatically allocated onto the stack."""
@needs_builder
def emit(self, context):
# Curiously, B uses the "maximum index" when declaring vectors. This
... | statement.emit(context) |
Given the code snippet: <|code_start|>
@ast_node
class AutoVectorStatement(ASTNode):
"""An auto variable is automatically allocated onto the stack."""
@needs_builder
def emit(self, context):
# Curiously, B uses the "maximum index" when declaring vectors. This
# mean, for example, that "auto ... | statement.emit(context) |
Continue the code snippet: <|code_start|> context.builder.position_at_end(while_body)
with context.setting_break_block(while_end):
self.body.emit(context)
# Branch back to condition
context.builder.branch(while_cond)
# Position after loop for further instructions
... | def emit(self, context): |
Given snippet: <|code_start|> context.builder.position_at_end(while_body)
with context.setting_break_block(while_end):
self.body.emit(context)
# Branch back to condition
context.builder.branch(while_cond)
# Position after loop for further instructions
context... | def emit(self, context): |
Based on the snippet: <|code_start|># Our implementation is such that that only lvalues are a dereferenced rvalue or
# an value retrieved from the current scope.
@ast_node
class DereferencedRValue(RValue):
"""A convenience wrapper representing a dereferenced RValue. The reference()
method simply returns the de... | def emit(self, context): |
Based on the snippet: <|code_start|> """A convenience wrapper representing a dereferenced RValue. The reference()
method simply returns the dereferenced RValue. This value is an LValue in
that it has a reference() method.
"""
def reference(self):
return self.rvalue
@needs_builder
de... | 'Variable not found in scope: {}'.format(self.name)) |
Based on the snippet: <|code_start|>
@needs_builder
def emit(self, context):
# Convert the rvalue word address into a llvm pointer to a word
ptr_type = context.word_type.as_pointer()
rvalue_val = self.rvalue.emit(context)
word_ptr = address_to_llvm_ptr(context, rvalue_val, ptr_ty... | class AddressOfScopeValue(RValue): |
Next line prediction: <|code_start|> """A convenience wrapper representing a dereferenced RValue. The reference()
method simply returns the dereferenced RValue. This value is an LValue in
that it has a reference() method.
"""
def reference(self):
return self.rvalue
@needs_builder
de... | 'Variable not found in scope: {}'.format(self.name)) |
Given the code snippet: <|code_start|>
@ast_node
class DereferencedRValue(RValue):
"""A convenience wrapper representing a dereferenced RValue. The reference()
method simply returns the dereferenced RValue. This value is an LValue in
that it has a reference() method.
"""
def reference(self):
... | val = context.scope[self.name] |
Based on the snippet: <|code_start|># an value retrieved from the current scope.
@ast_node
class DereferencedRValue(RValue):
"""A convenience wrapper representing a dereferenced RValue. The reference()
method simply returns the dereferenced RValue. This value is an LValue in
that it has a reference() metho... | try: |
Based on the snippet: <|code_start|> """An RValue cannot be referenced since it does not have an address."""
raise exc.SemanticError('Cannot reference an rvalue.')
# Our implementation is such that that only lvalues are a dereferenced rvalue or
# an value retrieved from the current scope.
@ast_node
cla... | def reference(self): |
Predict the next line for this snippet: <|code_start|>
def load_decoders():
dec_modules = dict()
# Walk recursively through all modules and packages.
for loader, module_name, ispkg in pkgutil.walk_packages(decoders.__path__, decoders.__name__ + '.'):
# If current item is a package, skip.
... | decoder_author=mod_object.decoder_author |
Next line prediction: <|code_start|>
class ClientMesh(Decoder):
decoder_name = "ClientMesh"
decoder__version = 1
decoder_author = "@kevthehermit"
<|code_end|>
. Use current file imports:
(from base64 import b64decode
from malwareconfig.common import Decoder
from malwareconfig.common import string_printabl... | decoder_description = "ClientMesh Decoder" |
Given the code snippet: <|code_start|>
# temp imports
class Mirai(Decoder):
decoder_name = "Mirai"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Mirai decoder with varients"
def __init__(self):
<|code_end|>
, generate the next line using the imports in this file:
i... | self.config = {} |
Given snippet: <|code_start|>
class AAR(Decoder):
decoder_name = "AAR"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Albertino Advanced RAT decoder"
def __init__(self):
self.config = {}
def parse_config(self, clean_config):
sections = clean_con... | config_dict['Port2'] = sections[5] |
Given the following code snippet before the placeholder: <|code_start|>
class AAR(Decoder):
decoder_name = "AAR"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Albertino Advanced RAT decoder"
def __init__(self):
self.config = {}
def parse_config(self, cl... | config_dict['AntiDebug'] = sections[4] |
Given the code snippet: <|code_start|>
class Arcom(Decoder):
decoder_name = "Arcom"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Arcom RAT Decoder"
def __init__(self):
<|code_end|>
, generate the next line using the imports in this file:
from base64 import b64deco... | self.config = {} |
Next line prediction: <|code_start|>
class Arcom(Decoder):
decoder_name = "Arcom"
decoder__version = 1
<|code_end|>
. Use current file imports:
(from base64 import b64decode
from malwareconfig import crypto
from malwareconfig.common import Decoder
from malwareconfig.common import string_printable)
and conte... | decoder_author = "@kevthehermit" |
Given snippet: <|code_start|>
class SpyNote(Decoder):
decoder_name = "SpyNote"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "SpyNote and MobiHook RAT Decoder"
def __init__(self):
self.config = {}
@staticmethod
def get_string(str_name, listoflists):
... | return None |
Predict the next line for this snippet: <|code_start|>
class BlackNix(Decoder):
decoder_name = "BlackNix"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "BlackNix RAT"
def __init__(self):
self.config = {}
<|code_end|>
with the help of current file imports:
... | def get_config(self): |
Using the snippet: <|code_start|>
class UPX(PreProcessor):
preprocessor_name = "UPX"
preprocessor__version = 1
<|code_end|>
, determine the next line of code. You have imports:
import os
import subprocess
from malwareconfig.yarascanner import YaraScanner
from malwareconfig.common import PreProcessor
from tem... | preprocessor_author = "@kevthehermit" |
Given snippet: <|code_start|>
class UPX(PreProcessor):
preprocessor_name = "UPX"
preprocessor__version = 1
preprocessor_author = "@kevthehermit"
<|code_end|>
, continue by predicting the next line. Consider current file imports:
import os
import subprocess
from malwareconfig.yarascanner import YaraScanne... | preprocessor_description = "Unpack UPX Samples" |
Using the snippet: <|code_start|> clean_dict['P2PSpread'] = v
if k == 'reg':
clean_dict['Registry Startup'] = v
if k == 'usb':
clean_dict['USB Spread'] = v
if k == 'usbn':
clean_dict['USB Name'] = v
if k == 'v... | conf_dict['USB Spread'] = conf[12] |
Using the snippet: <|code_start|> k,v = line.split(' = ')
raw_dict[k.strip('*')] = v.strip('%')
except Exception as e:
continue
return self.config_cleaner(raw_dict)
def config_cleaner(self, raw_dict):
clean_dict = {}
for k,v in raw_... | clean_dict['USB Spread'] = v |
Based on the snippet: <|code_start|>
class LuxNet(Decoder):
decoder_name = "LuxNet"
decoder__version = 1
decoder_author = "@kevthehermit"
<|code_end|>
, predict the immediate next line with the help of imports:
from malwareconfig.common import Decoder
from malwareconfig.common import string_printable
and... | decoder_description = "Luxnet RAT Decoder" |
Next line prediction: <|code_start|>
class Adzok(Decoder):
decoder_name = "Adzok"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Adzok Decoder"
def __init__(self):
<|code_end|>
. Use current file imports:
(from xml.etree import ElementTree as ET
from malwareconfig.c... | self.config = {} |
Using the snippet: <|code_start|>
# temp imports
class Plasma(Decoder):
decoder_name = "Plasma"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Plasma decoder for 1.7 This is identical to LuminosityLink"
<|code_end|>
, determine the next line of code. You have imports:
... | def __init__(self): |
Using the snippet: <|code_start|>
# temp imports
class Plasma(Decoder):
decoder_name = "Plasma"
decoder__version = 1
<|code_end|>
, determine the next line of code. You have imports:
import re
import binascii
import hashlib
import re
import zlib
import uuid
from base64 import b64decode
from malwareconfig im... | decoder_author = "@kevthehermit" |
Next line prediction: <|code_start|>
# temp imports
class NanoCore(Decoder):
decoder_name = "NanoCore"
decoder__version = 1
<|code_end|>
. Use current file imports:
(from malwareconfig import crypto
from malwareconfig.common import Decoder
from malwareconfig.common import string_printable
from binascii impor... | decoder_author = "@kevthehermit" |
Based on the snippet: <|code_start|>
# temp imports
class NanoCore(Decoder):
decoder_name = "NanoCore"
decoder__version = 1
decoder_author = "@kevthehermit"
<|code_end|>
, predict the immediate next line with the help of imports:
from malwareconfig import crypto
from malwareconfig.common import Decoder
f... | decoder_description = "NanoCore decoder for early versions" |
Based on the snippet: <|code_start|>
class CyberGate(Decoder):
decoder_name = "CyberGate"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "CyberGate RAT"
def __init__(self):
self.config = {}
@staticmethod
def xor(data):
decoded = ''
key ... | def get_config(self): |
Using the snippet: <|code_start|>
class JRat(Decoder):
decoder_name = "JRat"
decoder__version = 1
<|code_end|>
, determine the next line of code. You have imports:
from binascii import unhexlify
from base64 import b64decode
from malwareconfig import crypto
from malwareconfig.common import Decoder
from malware... | decoder_author = "@kevthehermit" |
Predict the next line for this snippet: <|code_start|>
class JRat(Decoder):
decoder_name = "JRat"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Java Based RAT"
<|code_end|>
with the help of current file imports:
from binascii import unhexlify
from base64 import b64deco... | def __init__(self): |
Predict the next line for this snippet: <|code_start|>
class FileParser:
def __init__(self, file_path=None, rawdata=None):
if file_path:
file_object = open(file_path, 'rb')
else:
file_object = io.BytesIO(rawdata)
file_object.name = "DummyFile.ext"
self... | if hash_type == "sha256": |
Predict the next line for this snippet: <|code_start|>
class DarkRAT(Decoder):
decoder_name = "DarkRAT"
decoder__version = 1
<|code_end|>
with the help of current file imports:
from base64 import b64decode
from malwareconfig import crypto
from malwareconfig.common import Decoder
from malwareconfig.common im... | decoder_author = "@kevthehermit" |
Next line prediction: <|code_start|>
class AdWind(Decoder):
decoder_name = "AdWind"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "AdWind Decoder"
def __init__(self):
self.config = {}
@staticmethod
def parse_config(old_config):
if old_config[... | new_config['Reg Value'] = old_config['regname'] |
Next line prediction: <|code_start|>
class AdWind(Decoder):
decoder_name = "AdWind"
decoder__version = 1
decoder_author = "@kevthehermit"
<|code_end|>
. Use current file imports:
(from xml.etree import ElementTree as ET
from malwareconfig import crypto
from malwareconfig.common import Decoder)
and conte... | decoder_description = "AdWind Decoder" |
Continue the code snippet: <|code_start|> sample_path = "tests/samples/aar"
results = decode_sample(sample_path)
assert results['Version'] == '4.x'
def test_adwind():
sample_path = "tests/samples/adwind"
results = decode_sample(sample_path)
assert results['Version'] == 'Adwind RAT v2.0'
def tes... | sample_path = "tests/samples/blackshades" |
Given the following code snippet before the placeholder: <|code_start|>
def test_decoders_import():
assert 'AAR' in __decoders__.keys()
assert 'AdWind' in __decoders__.keys()
assert 'Adzok' in __decoders__.keys()
assert 'AlienSpy' in __decoders__.keys()
assert 'Alina' in __decoders__.keys()
asse... | module.set_file(file_info) |
Predict the next line for this snippet: <|code_start|>
class Sakula(Decoder):
decoder_name = "Sakula"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Sakula Rat"
def __init__(self):
self.config = {}
@staticmethod
def config_v1(config_list):
pri... | config_dict['Waiting Time'] = unpack('>H', config[8][:2].rstrip(b'\x88'))[0] |
Based on the snippet: <|code_start|>
class Jbifrost(Decoder):
decoder_name = "Jbifrost"
decoder__version = 1
decoder_author = ["@kevthehermit", "Chris"]
decoder_description = "Jbifrost Java RAT"
def __init__(self):
self.config = {}
<|code_end|>
, predict the immediate next line with the ... | @staticmethod |
Given the following code snippet before the placeholder: <|code_start|>
class Jbifrost(Decoder):
decoder_name = "Jbifrost"
decoder__version = 1
decoder_author = ["@kevthehermit", "Chris"]
<|code_end|>
, predict the next line using imports from the current file:
import javaobj # sudo pip3 install javaobj-p... | decoder_description = "Jbifrost Java RAT" |
Given the following code snippet before the placeholder: <|code_start|>
def __init__(self):
self.config = {}
@staticmethod
def parse_xml(xml_string):
# Convert to XML
xml = ET.fromstring(xml_string)
# Read the XML to a config dict
properties_dict = {}
for ... | def extract_from_droppper(self): |
Continue the code snippet: <|code_start|>
class HawkEye(Decoder):
decoder_name = "HawkEye"
decoder__version = 1
decoder_author = "@kevthehermit"
<|code_end|>
. Use current file imports:
from base64 import b64decode
from binascii import unhexlify, hexlify
from malwareconfig import crypto
from malwareconfi... | decoder_description = "Decoder For Hawkeye Cred Stealer" |
Given the following code snippet before the placeholder: <|code_start|>
class HawkEye(Decoder):
decoder_name = "HawkEye"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Decoder For Hawkeye Cred Stealer"
def __init__(self):
self.config = {}
<|code_end|>
, pred... | def get_config(self): |
Next line prediction: <|code_start|>
prng_seed = 0
class BlackShades(Decoder):
decoder_name = "BlackShades"
decoder__version = 1
decoder_author = "@botnet_hunter, @kevthehermit"
decoder_description = "BlackShades Decoder"
def __init__(self):
self.config = {}
@staticmethod
def is_... | def get_next_rng_value(): |
Next line prediction: <|code_start|>
class LuminosityLink(Decoder):
decoder_name = "LuminosityLink"
decoder__version = 1
<|code_end|>
. Use current file imports:
(import re
import binascii
import hashlib
from base64 import b64decode
from malwareconfig import crypto
from malwareconfig.common import Decoder
f... | decoder_author = "@kevthehermit" |
Next line prediction: <|code_start|>
class BlueBanana(Decoder):
decoder_name = "BlueBanana"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Decoder for Blue Banana"
def __init__(self):
<|code_end|>
. Use current file imports:
(import binascii
from malwareconfig import... | self.config = {} |
Given the following code snippet before the placeholder: <|code_start|>
class BlueBanana(Decoder):
decoder_name = "BlueBanana"
decoder__version = 1
<|code_end|>
, predict the next line using imports from the current file:
import binascii
from malwareconfig import crypto
from malwareconfig.common import Decode... | decoder_author = "@kevthehermit" |
Using the snippet: <|code_start|>
class Bozok(Decoder):
decoder_name = "Bozok"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Bozok Decoder"
def __init__(self):
self.config = {}
<|code_end|>
, determine the next line of code. You have imports:
from malwarec... | def get_config(self): |
Predict the next line after this snippet: <|code_start|>
rule_source = '''
rule opcodes {
meta:
description = "Netwire instruction sequences"
author = "David Cannings"
strings:
$opcodes01 = { 31 C0 88 44 01 08 40 3D 00 01 00 00 75 F4 }
$opcodes02 = { 8A 5C 06 08 88 9C 05 F4 FE FF FF 40 3D 00 01 0... | $opcodes04 = { E8 ?? ?? 00 00 C7 44 ?? ?? ?? ?? 00 00 C7 44 ?? ?? ?? ?? ?? 00 89 ?? ?? E8 ?? ?? ?? 00 } |
Given the code snippet: <|code_start|> except Exception as e:
print(e)
pass
@staticmethod
def version_d(enckey, coded_jar):
return AlienSpy.version_c(enckey, coded_jar, rounds=22, P=0xb7e15263, Q=0x9e3779c9)
@staticmethod
def decrypt_XOR(keys, data):
... | "kevthehermitisacompletegaywhatfuckwithhismotherXDXDXD", |
Predict the next line for this snippet: <|code_start|> config_dict['ConfigKey'] = key
return config_dict
except Exception as e:
print(e)
pass
@staticmethod
def version_d(enckey, coded_jar):
return AlienSpy.version_c(enckey, code... | "Zlolskmzzzznzbxbxjxjjzkkzzkiziopoakidqoiwjdiqjhwdiqjwiodjdhjhbhbvhcebucbecercsdsd", |
Predict the next line after this snippet: <|code_start|>
# temp imports
class Xtreme(Decoder):
decoder_name = "Xtreme"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "Xtreme decoder for 2.9, 3.1, 3.2, 3.5"
def __init__(self):
self.config = {}
def get_unic... | for i in range(len(buf[pos:])): |
Predict the next line after this snippet: <|code_start|>
# temp imports
class Xtreme(Decoder):
decoder_name = "Xtreme"
decoder__version = 1
decoder_author = "@kevthehermit"
<|code_end|>
using the current file's imports:
from malwareconfig import crypto
from malwareconfig.common import Decoder
from malwa... | decoder_description = "Xtreme decoder for 2.9, 3.1, 3.2, 3.5" |
Given snippet: <|code_start|>
class Remcos(Decoder):
decoder_name = "Remcos"
decoder__version = 1
<|code_end|>
, continue by predicting the next line. Consider current file imports:
from malwareconfig.crypto import decrypt_arc4
from malwareconfig.common import Decoder
from malwareconfig.common import string_... | decoder_author = "@kevthehermit" |
Based on the snippet: <|code_start|>
class Remcos(Decoder):
decoder_name = "Remcos"
decoder__version = 1
decoder_author = "@kevthehermit"
<|code_end|>
, predict the immediate next line with the help of imports:
from malwareconfig.crypto import decrypt_arc4
from malwareconfig.common import Decoder
from ma... | decoder_description = "Remcos Decoder" |
Predict the next line after this snippet: <|code_start|>
class DarkComet(Decoder):
decoder_name = "DarkComet"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "DarkComet decoder for all known versions"
def __init__(self):
self.config = {}
@staticmethod
d... | config = {} |
Using the snippet: <|code_start|>
class DarkComet(Decoder):
decoder_name = "DarkComet"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "DarkComet decoder for all known versions"
def __init__(self):
self.config = {}
@staticmethod
def get_version(raw_data... | elif b'#KCMDDC5#' in raw_data: |
Using the snippet: <|code_start|>
class DarkComet(Decoder):
decoder_name = "DarkComet"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "DarkComet decoder for all known versions"
def __init__(self):
self.config = {}
@staticmethod
def get_version(raw_data... | elif b'#KCMDDC51#' in raw_data: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.