3
I have a database with a password field, which has a sort of "encryption".
Analyzing the logic: I created users in the system and put the password: 123. When I went to check the password in the bank it was: 032.
If we go to a logical reasoning, when I put 1, it generated 0 (a value below); when I put 2, it generated 3 (a value above) and then 3, it generated 2 (a value below).
Other examples:
SENHA RESULTADO NO BANCO
abcdefghijklmnopqrstuvwxyz 'cbedgfihkjmlonqpsrutwvyx{
ABCDEFGHIJKLMNOPQRSTUVWXYZ @CBEDGFIHKJMLONQPSRUTWVYX[
0123456789 1032547698
(reading the password it will replace at each position one value above and another below).
How can I generate this logic in Java?
Friend this may help you edit: http://answall.com/help/mcve
– Guilherme Nascimento
William Nascimento, thank you very much. But from what I put up there I could understand that I don’t have the code, I want to develop it from the reported logic.
– Vinicius Luciene
Follow the solution if they reopen as a response. http://ideone.com/lIUpWe Note that you edited with the example of "master" but if it is really alternated, the result is different. Create users with longer passwords, such as 333333, dddddd, etc to see if logic proceeds.
– Bacco
Hi Bacco, I created these passwords: created password : abcdefghijklmnopqrstuvwxyz - database result: 'cbedgfihkjmlonqpsrutwvyx{ Created password : ABCDEFGHIJKLMNOPQRSTUVWXYZ - Database result: @CBEDGFIHKJMLONQPSRUTWVYX[ Password Created : 0123456789 - Bank Result: 1032547698
– Vinicius Luciene
Yeah, it looks okay. Did you see the link I posted? to decide the first character whether it is "up" or "down" just invert j ( int j=1 to int j=-1 ) http://ideone.com/lIUpWe
– Bacco
now, if these examples are right, it may be that the "sense" varies according to the ID being even or odd, or qq another crazy idea, because in each case the "rotation" is to one side.
– Bacco
I saw Bacco, but analyzing his code he makes a position kind of fixed, because when I did the test in the typing code: master he did not return me, example the "a" as " ". It returns me this value if the "a" is in the first position, understood?
– Vinicius Luciene
I understood perfectly, the problem is if it’s 1 down and 1 up, or it’s lb, or it’s n' the start. it depends on the position. It may be that logic uses something else that you didn’t consider, such as the parity of the previous character, or some other component that isn’t only in 1 -1 1 1 -1 1 -1 - this will tell you if you test with aaabbbbccc for example.
– Bacco
Thanks man, you’re helping me a lot. But from what I’m seeing, he doesn’t follow this logic.
– Vinicius Luciene
That’s the danger of asking the question based on an initial impression. The best thing to do would be to test several different examples, and make a table with the results, not just similar sequences. The more samples, the more chance to understand. It may even be that the Name field influences the password, who knows. Just testing. Registering 3 times the same password and seeing if they match is another relevant test.
– Bacco
but I have this information in his Bank, and I see that the values do not merge (1 up and another down) so help to generate a code that does the same thing. From what I see, it is as if it were substitution, ex: "a" = "'", etc...and as if it followed the ascii table, where before the "a" comes "'" and before the "a" comes "@"
– Vinicius Luciene
I saw another password here: Encrypted Password : O@U@M3105 - ?
– Vinicius Luciene
Just to answer your last comment, before the @Bacco issue your question was very confusing, so whether or not you have code, you should understand that what is obvious to you depending on the way you write may not be clear to others. Note: When you reply to someone specific use
@NomeDoUsuario
, because if nothing appears in "INBOX". Good night.– Guilherme Nascimento