This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
First part: Leaking password | |
""" | |
import paramiko | |
from time import sleep | |
import sys | |
from pwn import p64 | |
def test_password(password): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Cpf { | |
private static final int[] cpfWeight = {11, 10, 9, 8, 7, 6, 5, 4, 3, 2}; // pesos do cpf, para uso no algoritmo de digito verificador | |
private static int calculateVerifierDigit(String input, int[] weight) { // funcao de digito verificador, recebe a mensagem a ser verificada e seu peso | |
int sum = 0; // declaracao da soma | |
for (int i = input.length() - 1, digit; i >= 0; i--) { | |
digit = Integer.parseInt(input.substring(i, i + 1)); // itera por cada digito do input | |
sum += digit * weight[weight.length - input.length() + index]; // 10 - 11 + index | |
} | |
sum = 11 - sum % 11; // pega o "módulo 11" da soma | |
return sum > 9 ? 0 : sum; // se a soma for 10, retornar 0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Repository | |
public interface customerRepository extends JpaRepository<Customer, Long>{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Repository | |
public interface productsRepository extends JpaRepository<Products, Long>{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Products { | |
@Id | |
@GeneratedValue(strategy=GenerationType.AUTO) | |
private Long id; | |
private String name; | |
@Unique | |
private String nickname; | |
private BigDecimal price; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Customer { | |
@Id | |
@GeneratedValue(strategy=GenerationType.AUTO) | |
private Long id; | |
private String firstName; | |
private String lastName; | |
@Unique | |
private String identityNumber; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --location --request POST "https://sandbox.pjbank.com.br/contadigital/ac42a32f416cebbde7ee61e16020ba7f4b955bbe" \ | |
--header "X-CHAVE-CONTA: 8f450e24c6ecfdd2e905b489c401ac7105550dbd" \ | |
--header "Content-Type: application/json" \ | |
--data "{ | |
\"valor\" : \"900.00\" | |
}" |
NewerOlder