2023 | CrewCTF | Web3
positive
Description¶
Stay positive.
nc positive.chal.crewc.tf 60003
Setup.sol
Positive.sol
Solution¶
-
We need to find a number of type int64 that is less than 0, and its opposite is also negative
If you have
int x = type(int).min;
, then-x
does not fit the positive range. This means thatunchecked { assert(-x == x); }
works 1
- As int64 type values range from -9223372036854775808 to 9223372036854775807, the answer will be -9223372036854775808
-
During the competition, I used fuzzing to get the answer uwu
Flag¶
crew{9o5it1v1ty1sth3k3y}
最后更新:
2023年7月10日 10:55:12
Contributors: