首先我们按提示找到源代码,看这一段:

int betting() //Asks user amount to bet
{
 printf("\n\nEnter Bet: $");
 scanf("%d", &bet);
 
 if (bet > cash) //If player tries to bet more money than player has
 {
        printf("\nYou cannot bet more money than you have.");
        printf("\nEnter Bet: ");
        scanf("%d", &bet);
        return bet;
 }
 else return bet;
} // End Function

提示我们的赌注不能大于我们拥有的钱,但如果我们输入大于我们拥有的钱,依然返回我们输入的值。当我们输入大于100万就得到flag:

当我输入100万时,加上原来的500我现在得到

pwnable.kr blackjack之write up

得到flag

 

相关文章:

  • 2021-06-25
  • 2021-10-22
  • 2021-08-14
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2021-09-12
  • 2021-12-13
猜你喜欢
  • 2021-12-17
  • 2021-05-29
  • 2021-06-16
  • 2021-09-12
  • 2021-07-03
  • 2021-06-14
  • 2021-12-24
相关资源
相似解决方案