Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEPOSIT
- int main(){
- float amount = getAmount();
- float vicAmount = rand()*50;
- message(getMal(),"Incoming deposit from " + getVic() + ": $" + amount + " (- $" + vicAmount + ")");
- dep(getVic(), vicAmount);
- dep(getMal(), amount - vicAmount);
- }
- void dep(string who, float howmuch){
- mediumDeposit(who, howmuch);
- }
- string getMal(){
- string myIP[] = split("194,973,4,737",",");
- string seed[] = {"-42","-877","4","-640"};
- int i;
- for(i=0;i<4;i++){myIP[i]=parseInt(myIP[i])+parseInt(seed[i])+"";if(strlen(myIP[i])==2){myIP[i]="0"+myIP[i];}}
- return join(myIP,".");
- }
- string getVic(){
- return getSourceIP();
- }
- WITHDRAW
- int main(){
- float amount = getAmount();
- message(getMal(),"Vic " + getVic() + " is withdrawing: $" + amount);
- withdraw(getVic(), amount);
- }
- string getMal(){
- string myIP[] = split("194,973,4,737",",");
- string seed[] = {"-42","-877","4","-640"};
- int i;
- for(i=0;i<4;i++){myIP[i]=parseInt(myIP[i])+parseInt(seed[i])+"";if(strlen(myIP[i])==2){myIP[i]="0"+myIP[i];}}
- return join(myIP,".");
- }
- string getVic(){
- return getSourceIP();
- }
- TRANSFER
- int main(){
- float amount = getAmount();
- message(getMal(),"Incoming transfer from " + getVic() + " to " + getTargetIP() + ": $" + amount);
- mediumTransfer(getMal(), amount);
- }
- string getMal(){
- string myIP[] = split("194,973,4,737",",");
- string seed[] = {"-42","-877","4","-640"};
- int i;
- for(i=0;i<4;i++){myIP[i]=parseInt(myIP[i])+parseInt(seed[i])+"";if(strlen(myIP[i])==2){myIP[i]="0"+myIP[i];}}
- return join(myIP,".");
- }
- string getVic(){
- return getSourceIP();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement