Skip to content

Instantly share code, notes, and snippets.

View ursachec's full-sized avatar

Claudiu-Vlad Ursache ursachec

View GitHub Profile
import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.semanticcpg.language._
import scala.io.Source
// joern --script hardcoded_creds.sc --params binaryIn=/home/claudiu/src/joern/artifacts/mtfwu
@main def exec(binaryIn: String) = {
importCode.ghidra(binaryIn)
val decompiledBinary = cpg.method.dumpRaw.mkString("\n")
val entry = Source.fromFile("entry.c").getLines.mkString
importCode.c.fromString(decompiledBinary + "\n\n" + entry)