How do I put these codes in ob? Pls, Help:)



  • if (strlen($cc) == 16) {
    $cc1 = substr($cc, 0, 4);
    $cc2 = substr($cc, 4, 4);
    $cc3 = substr($cc, 8, 4);
    $cc4 = substr($cc, 12, 4);
    }
    if (strlen($cc) == 15) {
    $cc1 = substr($cc, 0, 4);
    $cc2 = substr($cc, 4, 4).' '.substr($cc, 8, 4);
    $cc3 = substr($cc, 12, 4);
    }


    if(substr($cc, 0, 1) == 4){
    $type = "red";
    }elseif(substr($cc, 0, 1) == 5){
    $type = "yellow";
    }elseif(substr($cc, 0, 1) == 3){
    $type = "orange";
    }
    else{
    $type = "green";
    }


    switch ($mes) {
    case '01':
    $mes = '1';
    break;
    case '02':
    $mes = '2';
    break;
    case '03':
    $mes = '3';
    break;
    case '04':
    $mes = '4';
    break;
    case '05':
    $mes = '5';
    break;
    case '06':
    $mes = '6';
    break;
    case '07':
    $mes = '7';
    break;
    case '08':
    $mes = '8';
    break;
    case '09':
    $mes = '9';
    break;
    }


    switch ($ano) {
    case '20':
    $ano = '2020';
    break;
    case '21':
    $ano = '2021';
    break;
    case '22':
    $ano = '2022';
    break;
    case '23':
    $ano = '2023';
    break;
    case '24':
    $ano = '2024';
    break;
    case '25':
    $ano = '2025';
    break;
    case '26':
    $ano = '2026';
    break;
    case '27':
    $ano = '2027';
    break;
    case '28':
    $ano = '2028';
    break;
    case '29':
    $ano = '2029';
    break;
    }

    BTW cc,mes,ano is my regex.



  • Ok, I can see that you're a brazilian. Dale é nois. Não sei se você quer fazer um finder de cvv ou apenas um checker de live.
    Anyway.
    You are using PHP syntax.
    Switch contiditals doesn't exists in OB untill now! But as como nos é formado em POG, programação orientada a Gambiarras...

    Just think a little bit how you can do a GVAR or a list. This code is VERY VERY bad coded.

    So I was thinking about showing how you could by yourself get in a solution, which is very simple and loli is VERY usefull for that.
    I'll try to make examples and by there you can try by yourself and any doubts just talkt to me, q eu te ajudo irmão.
    if (strlen($cc) == 16)
    Im assuming cc as Data input,
    #QNTSNUMEROS FUNCTION Length "<cc>" -> VAR "ccPAN"
    #LacosLogicos IF "<ccPAN>" EqualTo "16"
    FUNCTION Substring "0" "4" "<cc>" -> VAR "cc1"
    ....
    ELSE
    ...
    ENDIF

    Quanto ao switch, olha concat e trim.
    Abraços.



  • @AMCypher I Didn't understand well I can't understand the Brazilian language. Just English, Bro Pls Help Me:)



  • @AMCypher keep the conversations in English please --->https://forum.openbullet.dev/topic/3/terms-of-use



  • Is there someone who knows how to code or put that in ob


  • Banned

    hey see you private



  • Assuming cc is the default Data input.
    The first line compare the length of the string with 16.
    It's a if statement. It gets a little bit harder in loli to do this in one single line so I'll be more clear.

    if (strlen($cc) == 16)  
    
    FUNCTION Length "<cc>" -> VAR "ccPAN"
    IF "<ccPAN>" EqualTo "16"
    FUNCTION Substring "0" "4" "<cc>" -> VAR "cc1"
    FUNCTION CharAt "4" "<cc>" -> VAR "cc2" 
    ELSE
    #do the same with string concatenation
    ENDIF
    

    and so goes on trimming using Substring function as you desire.



  • Thank you! Hope works:)


Log in to reply