All pastes #1972535 Raw Edit

Unnamed

public text v1 · immutable
#1972535 ·published 2010-10-25 08:16 UTC
rendered paste body
int main(){
    string ip;
    float depos_amount;
    float amount[];
    
    //Get Amount
    depos_amount = getAmount();
    
    //IP Addresses
    ip[1] = getMaliciousIP();
    ip[2] = getSourceIP();
    
    //Maths Part
    amount[1] = depost_amount - doPercent(depos_amount); //Victim Deposit Amount
    amount[2] = doPercent(depos_amount); //Attacker deposit amount
    
    //Do deposits
    for(x = 1; x <= 2; x++) {
        doDeposit(ip[x], amount[x]);
    }
}

//Math
float doPercent(float amount) {
    return amount * 0.10;
}

//deposit wrapper
void doDeposit(ip, amount) {
    mediumDeposit(ip, amount);
}