SA-MP Forums Archive
[Pedido] Anti Encrypt - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Anti Encrypt (/showthread.php?tid=539991)



Anti Encrypt - Miineiro - 01.10.2014

Й possнvel criar um anti-Encrypt para usar como se fosse um comando /versenha ?

pawn Код:
public Encrypt(string[])
{
    for(new x=0; x < strlen(string); x++)
      {
          string[x] += (3^x) * (x % 15);
          if(string[x] > (0xff))
          {
              string[x] -= 256;
          }
      }
    return 1;
}



Re: Anti Encrypt - ipsLuan - 01.10.2014

Acho que й impossнvel, aconselho a usar WP_Hash.


Re: Anti Encrypt - Miineiro - 01.10.2014

Hm.. Mas e se eu ja uso esse tem como converter ou seila ? .-.


Re: Anti Encrypt - WLSF - 01.10.2014

й sу fazer a operaзгo ao inverso cara.

pawn Код:
Encrypt(string[])
{
    for(new x=0; x < strlen(string); x++)
      {
          string[x] += (3^x) * (x % 15);
          if(string[x] > (0xff))
          {
              string[x] -= 256;
          }
      }
    return 1;
}

Decrypt(string[])
{
    for (new i = 0; i < strlen(string); ++i)
    {
        string[i] -= (3 ^ i) * (i % 15);
        if (string[i] > 0xff)
        {
            string[i] -= 256;
        }
    }
}



Re: Anti Encrypt - ipsLuan - 01.10.2014

@edit
Serб que funcionaria?


Re: Anti Encrypt - WLSF - 01.10.2014

Quote:
Originally Posted by xCR7
Посмотреть сообщение
@edit
Serб que funcionaria?
Sem spam brother, se tu viu o erro no cуdigo, tu pode corrigir e mandar de novo, todo mundo erra...

E respondendo a sua pergunta, testei aqui e funcionou.

pawn Код:
new str[] = "blink";
    Encrypt(str);
    print(str);
    new str2[128];
    strcat(str2, str);
    Decrypt(str2);
    print(str2);

//ou

    new str[] = "blink";
    Encrypt(str);
    print(str);
    Decrypt(str);
    print(str);

Abraзos.


Re: Anti Encrypt - Miineiro - 02.10.2014

pawn Код:
CMD:minhasenha(playerid, params[]){
    if(!IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && gPlayerLogged[playerid] == 0)
        return ShowInfoForPlayer(playerid, "~w~Voce ~r~nao~w~ esta online!", 5000);
    format(gstring, sizeof(gstring), "SERVER: sua senha й %s!!!", Decrypt(PlayerInfo[playerid][Rufflesey]));
    SendClientMessage(playerid,COLOR_GRAD1,gstring);
    return 1;
}
Nгo funcionou.

Testei assim tbm.

pawn Код:
new str[] = "rola";
    Encrypt(str);
    print(str);
    Decrypt("rqna");
    print(str);
'rqna' й rola "encriptada"


Re: Anti Encrypt - PT - 02.10.2014

esta usando errado.

pawn Код:
new str[] = "rola";
Encrypt(str);
print(str);
Decrypt(str);
print(str);



Re: Anti Encrypt - Miineiro - 02.10.2014

Ok, e qual o erro deste comando ?

pawn Код:
CMD:minhasenha(playerid, params[]){
    if(!IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && gPlayerLogged[playerid] == 0)
        return ShowInfoForPlayer(playerid, "~w~Voce ~r~nao~w~ esta online!", 5000);
    format(sstringg, sizeof(sstringg), "SERVER: sua senha й %s!!!", Decrypt(PlayerInfo[playerid][Rufflesey]));
    SendClientMessage(playerid,COLOR_GRAD1,sstringg);
    return 1;
}



Re: Anti Encrypt - SW1FTmeister - 02.10.2014

Nгo se chama anti-encrypt, chama-se encrypt. LOL