vencinachev

IBAN Check

Mar 30th, 2021
1,803
0
Never
8
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.18 KB | None | 0 0
  1. <?php
  2. function isValidIBAN($iban){
  3.     if (strlen($iban) != 22){
  4.         return false;
  5.     }
  6.    
  7.     $str = substr($iban, 4) . substr($iban, 0, 4);
  8.    
  9.     $num = "";
  10.     for($i = 0; $i < strlen($str); $i++){
  11.         if (is_numeric($str[$i])){
  12.             $num = $num . $str[$i];
  13.         } else {
  14.             $n = ord($str[$i]) - ord('A') + 10;
  15.             $num = $num . $n;
  16.         }
  17.     }
  18.     if (mod($num, 97) != 1){
  19.         return false;
  20.     }
  21.    
  22.     $str[20] = '0';
  23.     $str[21] = '0';
  24.     $num = "";
  25.     for($i = 0; $i < strlen($str); $i++){
  26.         if (is_numeric($str[$i])){
  27.             $num = $num . $str[$i];
  28.         } else {
  29.             $n = ord($str[$i]) - ord('A') + 10;
  30.             $num = $num . $n;
  31.         }
  32.     }
  33.    
  34.     $controlCalulated = 98 - mod($num, 97);
  35.     $control = intval($iban[2].$iban[3]);
  36.    
  37.     if ($control != $controlCalulated){
  38.         return false;
  39.     }
  40.    
  41.     return true;
  42. }
  43.  
  44. function mod($num, $a) {
  45.     // Initialize result
  46.    $res = 0;
  47.     // One by one process
  48.     // all digits of 'num'
  49.     for ($i = 0; $i < strlen($num); $i++){
  50.         $res = ($res * 10 + $num[$i] - '0') % $a;
  51.     }
  52.     return $res;
  53. }
  54. ?>
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Niksazon
    75 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
Add Comment
Please, Sign In to add comment