FindSymbol uses regexp from one or multiple clues to find variable or function symbol in obfuscated code.
(debugInfo, content string, clues []string)
| 300 | // FindSymbol uses regexp from one or multiple clues to find variable or |
| 301 | // function symbol in obfuscated code. |
| 302 | func FindSymbol(debugInfo, content string, clues []string) []string { |
| 303 | for _, v := range clues { |
| 304 | re := regexp.MustCompile(v) |
| 305 | found := re.FindStringSubmatch(content) |
| 306 | if found != nil { |
| 307 | return found[1:] |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | if len(debugInfo) > 0 { |
| 312 | PrintError("Cannot find symbol for " + debugInfo) |
| 313 | } |
| 314 | |
| 315 | return nil |
| 316 | } |
| 317 | |
| 318 | // FindSymbolWithPattern uses regexp from one or multiple clues to find variable or |
| 319 | // function symbol in obfuscated code. Returns the matched symbols and the pattern that matched. |
no test coverage detected