Strace Ltrace Retrace
Get this cotton candy machine working
Contents of the current directory is a binary called make the candy*
Running it gives an error message:
1 2 |
|
So let's run ltrace on it and find out where this conf file is!
1 2 3 4 5 6 |
|
Looking for registration.json
.
So what happens if we touch registration.json
and run it?
1 2 3 4 5 6 7 8 |
|
A new error, "Unregistered."
What happens if I run strace on it?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
A bit more output! One thing I'm focusing on however that it looks like it's reading the file but since it's a zero-length file, it just bombs out. What happens if I add something to the file?
1 2 3 4 5 6 7 8 9 10 |
|
Interesting...it looks like it read in the string I fed it (Merry Christmas!
) and compared it to the string Registration
. Since this is a JSON file I probably have to format it as such. Let's give it what it wants!
1 2 3 4 5 6 7 8 9 10 11 |
|
A little bit better. Looks like it's looking for a literal colon :
. Let's accommodate!
1 2 3 4 5 6 7 8 9 10 11 12 |
|
So I was almost right with assuming yes please
was enough. Intead it looks like it's comparing it against the string True
. Could that be all it needs?
1 2 3 4 5 6 7 8 9 10 11 12 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
Christmas is saved again!