forked from openrs2/openrs2
parent
3dcf91cfef
commit
3db4c82569
@ -0,0 +1,11 @@ |
||||
package dev.openrs2.asm |
||||
|
||||
import com.fasterxml.jackson.core.JsonParser |
||||
import com.fasterxml.jackson.databind.DeserializationContext |
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer |
||||
|
||||
object MemberRefDeserializer : StdDeserializer<MemberRef>(MemberRef::class.java) { |
||||
override fun deserialize(parser: JsonParser, ctx: DeserializationContext): MemberRef { |
||||
return MemberRef.fromString(ctx.readValue(parser, String::class.java)) |
||||
} |
||||
} |
@ -1,9 +1,12 @@ |
||||
package dev.openrs2.asm.filter |
||||
|
||||
class GlobClassFilter(vararg patterns: String) : ClassFilter { |
||||
private val patterns = patterns.map(Glob::compileClass).toList() |
||||
import com.fasterxml.jackson.annotation.JsonIgnore |
||||
|
||||
class GlobClassFilter(@Suppress("CanBeParameter") private val patterns: List<String>) : ClassFilter { |
||||
@JsonIgnore |
||||
private val compiledPatterns = patterns.map(Glob::compileClass).toList() |
||||
|
||||
override fun matches(name: String): Boolean { |
||||
return patterns.any { it.matches(name) } |
||||
return compiledPatterns.any { it.matches(name) } |
||||
} |
||||
} |
||||
|
@ -0,0 +1,15 @@ |
||||
package dev.openrs2.deob |
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper |
||||
import java.nio.file.Files |
||||
import java.nio.file.Paths |
||||
import javax.inject.Inject |
||||
import javax.inject.Provider |
||||
|
||||
class ProfileProvider @Inject constructor(private val mapper: ObjectMapper) : Provider<Profile> { |
||||
override fun get(): Profile { |
||||
return Files.newBufferedReader(Paths.get("share/deob/profile.yaml")).use { reader -> |
||||
mapper.readValue(reader, Profile::class.java) |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,34 @@ |
||||
--- |
||||
excluded_classes: |
||||
- "client" |
||||
- "com/sun/opengl/impl/x11/**" |
||||
- "jagex3/jagmisc/jagmisc" |
||||
- "jaggl/**" |
||||
- "javax/media/opengl/**" |
||||
- "loader" |
||||
- "unpack" |
||||
- "unpackclass" |
||||
excluded_methods: |
||||
- "**.<clinit> *" |
||||
- "**.<init> *" |
||||
- "**.main *" |
||||
- "**.providesignlink *" |
||||
- "**.quit *" |
||||
- "com/sun/opengl/impl/x11/**.* *" |
||||
- "jaggl/**.* *" |
||||
- "javax/media/opengl/**.* *" |
||||
excluded_fields: |
||||
- "**.cache *" |
||||
- "com/sun/opengl/impl/x11/**.* *" |
||||
- "jaggl/**.* *" |
||||
- "javax/media/opengl/**.* *" |
||||
entry_points: |
||||
- "**.<clinit> *" |
||||
- "**.main *" |
||||
- "**.providesignlink *" |
||||
- "client.<init> *" |
||||
- "com/sun/opengl/impl/x11/DRIHack.begin *" |
||||
- "com/sun/opengl/impl/x11/DRIHack.end *" |
||||
- "loader.<init> *" |
||||
- "unpackclass.<init> *" |
||||
max_obfuscated_name_len: 2 |
Loading…
Reference in new issue