Module refinery.units.formats.java.jvstr
Expand source code Browse git
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from refinery.units import Unit
from refinery.lib.java import JvClassFile
class jvstr(Unit):
"""
Extract string constants from Java class files.
"""
def process(self, data):
jc = JvClassFile(data)
for string in jc.strings:
yield string.encode(self.codec)
@classmethod
def handles(self, data):
return data[:4] == B'\xCA\xFE\xBA\xBE'
Classes
class jvstr
-
Extract string constants from Java class files.
Expand source code Browse git
class jvstr(Unit): """ Extract string constants from Java class files. """ def process(self, data): jc = JvClassFile(data) for string in jc.strings: yield string.encode(self.codec) @classmethod def handles(self, data): return data[:4] == B'\xCA\xFE\xBA\xBE'
Ancestors
Class variables
var required_dependencies
var optional_dependencies
Inherited members