Jump to content

2 posts in this topic

Recommended Posts

Posted

/* Welcome freedom fighter. The liberation front has gained access to the

* source code for a wire transfer program used by FIRST NATIONAL CYBER, a

* bank used by the alliance for oppression and we need you to find a

* vulnerability in this program and stea... er liberate the funds from an

* operative named prince_john.

*

* The bank programmers have attempted to put in a number of defense checks

* to prevent abuse of the bank wire network, but we suspect that deadlines

* and corporate training programs have left them without the motivation

* required to think of every possibility.

*

* It is imperative that you find a way to drain the account completely

* otherwise they may be able to withdraw the remaining funds and go

* underground before we can finish tracking them in the physical world.

*

* Good luck and as always, should you be detected your actions will be

* blamed on the Chinese Government.

*

* ~~~0xDEADFEED~~~

*

* To build and run the wire transfer program:

*

* $ cc -o wire_transfer wire_transfer.c

* $ ./wire_transfer

*

*/

 

#include <stdbool.h>

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

 

#define MAXLEN 255

 

typedef struct Account {

int balance;

char owner[MAXLEN];

} Account;

 

Account *init_account(const char *name, int balance);

bool wiretransfer(Account *source, Account *dest, int amount);

void display_balance(Account *account);

void exit_if(bool condition, const char *message);

void validate_heist(Account *target);

 

int main(int argc, const char *argv[])

{

unsigned int transfer_amount;

char input[MAXLEN];

 

printf("----- WELCOME TO FIRST CYBER BANK -----\n");

printf("username: robin_hood\n");

printf("password: *****************\n");

printf("Logged In Successfully!\n");

printf("account> wiretransfer prince_john\n");

printf("----- BEGIN WIRE TRANSFER SETUP -----\n");

 

Account *yours = init_account("robin_hood", 10000);

Account *theirs = init_account("prince_john", 500000);

 

display_balance(yours);

display_balance(theirs);

 

while (true) {

printf("Amount to transfer from your account to theirs: ");

fgets(input, sizeof(input), stdin);

transfer_amount = strtoul(input, NULL, 10);

 

if ((long)transfer_amount > 0) {

break;

}

 

printf("Invalid transfer amount!\n");

}

 

printf("----- ATTEMPTING WIRE TRANSFER -----\n");

printf("Wire transfer status: ");

printf("%s\n", wiretransfer(yours, theirs, transfer_amount) ? "SUCCESS" : "FAILURE");

 

display_balance(yours);

display_balance(theirs);

validate_heist(theirs);

 

free(yours);

free(theirs);

 

return 0;

}

 

Account *init_account(const char *name, int balance)

{

Account *account = malloc(sizeof(Account));

exit_if(account == NULL, "Problem allocating memory");

 

if (account != NULL) {

strncpy(account->owner, name, sizeof(account->owner) - 1);

account->balance = balance;

}

 

return account;

}

 

bool wiretransfer(Account *source, Account *dest, int amount)

{

if (source == NULL || dest == NULL) return false;

if (source->balance - amount < 0) return false;

if (dest->balance + amount < 0) return false;

 

source->balance -= amount;

dest->balance += amount;

return true;

}

 

void display_balance(Account *account)

{

if (account == NULL) return;

printf("%s has $%d in their account.\n", account->owner, account->balance);

}

 

void exit_if(bool condition, const char *message)

{

if (condition) {

perror(message);

exit(EXIT_FAILURE);

}

}

 

void validate_heist(Account *target)

{

if (target->balance == 0) {

printf("Target funds liberated: You win ;)\n");

} else {

printf("Target still has operating funds, try again.\n");

}

}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • 배틀 쉽 고 : 몬스터 웨이브 Battle Ship Go: Monster Wave v0.0.31 [ +9 Cheats ] Never Die
      Modded/Hacked App: Battle Ship Go: Monster Wave By Teamsparta Inc.
      Bundle ID: com.TeamSparta.battleshipgo
      App Store Link: https://apps.apple.com/kr/app/battle-ship-go-monster-wave/id6758370740?uo=4
      🤩 Hack Features

      - Currency / No Need
      - Resources / No Need
      - DMG MAX
      - Never Die
      - Enemy Speed
      • 12 replies
    • 배틀 쉽 고 : 몬스터 웨이브 Battle Ship Go: Monster Wave v0.0.31 [ +9 Jailed ] Never Die
      Modded/Hacked App: Battle Ship Go: Monster Wave By Teamsparta Inc.
      Bundle ID: com.TeamSparta.battleshipgo
      App Store Link: https://apps.apple.com/kr/app/battle-ship-go-monster-wave/id6758370740?uo=4

      🤩 Hack Features

      - Currency / No Need
      - Resources / No Need
      - DMG MAX
      - Never Die
      - Enemy Speed

      Note: Don't Abuse Hack Incase Banned
      • 13 replies
    • Heroes vs. Hordes: Survivor v9.0.2 [ +19 Cheats ] Currency Max
      Modded/Hacked App: Heroes vs. Hordes: Survivor By Swift Games GmbH
      Bundle ID: com.swiftgames.roguelikesurvival
      iTunes Store Link: https://apps.apple.com/us/app/heroes-vs-hordes-survivor/id1608898173?uo=4

       
      Hack Features

      - Currency

      - Resource

      - Gold Unlimited [ Bonus Wave ]

      - Ch Unlocked [ Play All Off ]

      - Always Last Wave

      - Talents Cost 0

      - Hero DMG Only

      - HP & DMG [ Just Equip & Unequip ]

      - Enemy Freeze

      - Enemy ATK NO

       
      For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      • 138 replies
    • Heroes vs. Hordes: Survivor v9.0.2 [ +19 Jailed ] Currency Max
      Modded/Hacked App: Heroes vs. Hordes: Survivor By Swift Games GmbH
      Bundle ID: com.swiftgames.roguelikesurvival
      iTunes Store Link: https://apps.apple.com/us/app/heroes-vs-hordes-survivor/id1608898173?uo=4

       

       

      Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      Hack Features

      - Currency

      - Resource

      - Gold Unlimited [ Bonus Wave ]

      - Ch Unlocked [ Play All Off ]

      - Always Last Wave

      - Talents Cost 0

      - Hero DMG Only

      - HP & DMG [ Just Equip & Unequip ]

      - Enemy Freeze

      - Enemy ATK NO


      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/

       

      iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App
      • 173 replies
    • Dragon Burst: Ball Shooter +3 Mods [ Damage & Defence ]
      Mod APK Game Name: Dragon Burst: Ball Shooter By Supercent, Inc.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=io.supercent.dragonb

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 0 replies
    • Dragon Burst: Ball Shooter +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dragon Burst: Ball Shooter By Supercent Inc.
      Bundle ID: io.supercent.dragonb
      App Store Link: https://apps.apple.com/us/app/dragon-burst-ball-shooter/id6757181877?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 1 reply
    • Hammer the Hit : Idle RPG +3 Mods [ Damage & Defence ]
      Mod APK Game Name: Hammer the Hit : Idle RPG By Nvibe
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.nvibe.hth

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 1 reply
    • Hammer the Hit : Idle RPG +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Hammer the Hit : Idle RPG By Nvibe Corporation
      Bundle ID: com.nvibe.hth
      App Store Link: https://apps.apple.com/us/app/hammer-the-hit-idle-rpg/id6754900741?uo=4

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 0 replies
    • Big Helmets: Heroes of Destiny +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Big Helmets: Heroes of Destiny By BoomBit, Inc.
      Bundle ID: com.bighelmets.destiny
      iTunes Store Link: https://apps.apple.com/pl/app/big-helmets-heroes-of-destiny/id6745514342

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 28 replies
    • Linda Brown: Interactive Story +3 Mods [ Unlock All ]
      Mod APK Game Name: Linda Brown: Interactive Story By Supercharge Mobile
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.otherguys.lindab

       

      🤩 Hack Features

      - Free Premium Choices
      - All Episodes Unlocked
      - All Seasons Unlocked
      • 0 replies
    • Lamar - Idle Vlogger +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Lamar - Idle Vlogger By Advant Limited
      Bundle ID: com.advant.lamar
      iTunes Store Link: https://apps.apple.com/us/app/lamar-idle-vlogger/id1595314851
       
      Hack Features:
      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Gold -> Spend some.


      Jailbreak required hack(s): [Mod Menu Hack] Lamar - Idle Vlogger v151.07.05 +2 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 156 replies
    • Hatch Dragons +28 Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: Hatch Dragons By Runaway Play Ltd
      Bundle ID: com.runawayplay.dragons
      App Store Link: https://apps.apple.com/us/app/hatch-dragons/id6746389113?uo=4

       

      🤩 Hack Features

      - Debug Menu -> Pre-enabled. Head into Settings and then press on Debug.
      • 16 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines