MCPcopy Create free account
hub / github.com/clementgallet/libTAS / fromIdaString

Method fromIdaString

src/program/Signature.cpp:30–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void Signature::fromIdaString(const std::string sigstr)
31{
32 bytes.clear();
33 mask.clear();
34
35 std::istringstream iss(sigstr);
36 int next = iss.peek();
37 while (next != EOF) {
38 if (next == '?') {
39 iss.get();
40 iss.get();
41 iss.get();
42 bytes.push_back(0xCC);
43 mask.push_back(0);
44 }
45 else {
46 int b;
47 iss >> std::hex >> b >> std::ws;
48 bytes.push_back((uint8_t) b);
49 mask.push_back(0xFF);
50 }
51 next = iss.peek();
52 }
53}
54
55// Output the sig as a "F8 66 4B ?? ?? ?? 88" format string
56std::string Signature::toIdaString() const

Callers 1

Calls 2

getMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected