diff --git a/Part2-FlushReload/attacker.c b/Part2-FlushReload/attacker.c index 86ddc14..cd32fe2 100644 --- a/Part2-FlushReload/attacker.c +++ b/Part2-FlushReload/attacker.c @@ -15,6 +15,7 @@ int main() { int index = -1; int flag = -1; + int maybe_flag= -1; CYCLES time = -1; int offset = 0; int new_offset = 0; @@ -36,9 +37,14 @@ int main() { } time = measure_one_block_access_time((ADDR_PTR)buf + offset * 128); if(time < CACHE_HIT_THRESHOLD) { - flag = offset; - index = i; - break; + if(offset == maybe_flag) { + flag = offset; + index = i; + break; + } + else { + maybe_flag = offset; + } } } printf("Flag: %d\n", flag);