├── .gitignore ├── .gitattributes ├── images ├── loading.gif └── sherlock.png ├── README.md ├── css └── style.css ├── api └── index.php ├── index.html └── js └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Don't have ignore - @Augustocoder 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Augustocoder/SherlockBase/HEAD/images/loading.gif -------------------------------------------------------------------------------- /images/sherlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Augustocoder/SherlockBase/HEAD/images/sherlock.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SherlockBase v3.0.5 (API Em Manutenção) 2 | 3 | ![Imagem Ilustrativa da Ferramenta](https://github.com/user-attachments/assets/33d8ad81-cf57-4a81-935d-8f8ba6b4a787) 4 | 5 | ## Sobre 6 | 7 | SherlockBase é uma aplicação web criada para consultar dados de CPF e CNPJ de forma rápida. Ela utiliza serviços públicos para obter informações cadastrais precisas e é ótima para quem deseja aprimorar técnicas de OSINT ou auxiliar processos internos de empresas. 8 | 9 | ### Aviso Legal 10 | **Não me responsabilizo pelo uso inadequado desta ferramenta.** Esta aplicação foi desenvolvida apenas para fins educacionais e de apoio empresarial. 11 | 12 | ## Requisitos 13 | - PHP 7.4 ou superior 14 | - Servidor web (XAMPP, Apache ou Nginx) 15 | - Acesso à internet 16 | 17 | ## Instalação 18 | 1. Clone ou baixe este repositório. 19 | 2. Coloque os arquivos no diretório do seu servidor web. Em ambientes XAMPP, use a pasta `htdocs`. 20 | 21 | Para iniciar um servidor local pelo terminal, execute: 22 | ```bash 23 | php -S localhost:8000 24 | ``` 25 | Depois acesse `http://localhost:8000` no navegador. 26 | 27 | ## Como Usar 28 | Digite um CPF ou CNPJ no campo da página inicial e clique no botão de 'Busca'. Os dados serão exibidos logo abaixo do formulário. 29 | 30 | ### Funcionalidades 31 | 32 | #### Consulta de CPF 33 | - Nome 34 | - CPF 35 | - Mãe 36 | - Nascimento 37 | - Pai 38 | - Sexo 39 | 40 | 41 | #### Consulta de CNPJ 42 | - CNPJ 43 | - Razão Social 44 | - Capital Social 45 | - Situação da Empresa 46 | - Sócios 47 | - Estado 48 | - E-mail 49 | - Telefone 50 | 51 | ## Perguntas Frequentes 52 | 53 | **De onde vêm os dados?** 54 | As informações são obtidas em serviços públicos como a Receita Federal e a Consulta Nacional. 55 | 56 | **A ferramenta é gratuita?** 57 | Sim. Você pode usá-la sem custos, seja para estudos ou para sua empresa. 58 | 59 | ## Precisa de Suporte? 60 | Entre em contato pelo e-mail [suporte@augustodev.anonaddy.com](mailto:suporte@augustodev.anonaddy.com). 61 | 62 | --- 63 | 64 | Sinta-se à vontade para contribuir ou reportar problemas! 65 | 66 | --- 67 | 68 | ![Logo](https://user-images.githubusercontent.com/121616883/211920003-3de2fe7e-ef41-42cc-b98c-9d6cfead41eb.png) 69 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | background-color: #f4f4f4; 4 | } 5 | 6 | .glass { 7 | background: rgba(30, 41, 59, 0.88); 8 | backdrop-filter: blur(7px) saturate(160%); 9 | border: 1.5px solid rgba(59, 130, 246, 0.18); 10 | } 11 | 12 | header { 13 | background-color: #333; 14 | color: white; 15 | padding: 1rem; 16 | } 17 | 18 | header h1 { 19 | margin: 0; 20 | } 21 | 22 | h3 { 23 | font-size: 1.5rem; 24 | color: #333; 25 | margin-bottom: 1rem; 26 | } 27 | 28 | main { 29 | max-width: 80%; 30 | margin: auto; 31 | padding: 2rem 0; 32 | } 33 | 34 | form { 35 | background-color: white; 36 | padding: 2rem; 37 | border-radius: 5px; 38 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 39 | } 40 | 41 | .result { 42 | background-color: white; 43 | padding: 2rem; 44 | border-radius: 5px; 45 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 46 | margin-top: 2rem; 47 | word-wrap: break-word; 48 | } 49 | 50 | .result p { 51 | font-size: 1.5rem; 52 | color: #333; 53 | margin-bottom: 1rem; 54 | } 55 | 56 | form label { 57 | display: block; 58 | margin-bottom: 0.5rem; 59 | } 60 | 61 | form input[type="number"] { 62 | width: 100%; 63 | padding: 0.5rem; 64 | margin-bottom: 1rem; 65 | box-sizing: border-box; 66 | } 67 | 68 | form button[type="submit"] { 69 | background-color: #333; 70 | color: white; 71 | border: none; 72 | padding: 0.5rem 1rem; 73 | cursor: pointer; 74 | } 75 | 76 | form button[type="submit"]:hover { 77 | background-color: #555; 78 | } 79 | 80 | @media screen and (max-width: 768px) { 81 | main { 82 | padding: 1rem; 83 | } 84 | 85 | form { 86 | padding: 1rem; 87 | } 88 | 89 | .result { 90 | padding: 1rem; 91 | } 92 | } 93 | 94 | @media screen and (max-width: 480px) { 95 | header h1 { 96 | font-size: 1.5rem; 97 | } 98 | 99 | h3 { 100 | font-size: 1.25rem; 101 | } 102 | 103 | main { 104 | max-width: 90%; 105 | } 106 | 107 | form input[type="number"] { 108 | font-size: 1.25rem; 109 | } 110 | 111 | form button[type="submit"] { 112 | font-size: 1.25rem; 113 | padding: 0.5rem 0.75rem; 114 | } 115 | 116 | .result p { 117 | font-size: 1.25rem; 118 | } 119 | } 120 | 121 | input::-webkit-outer-spin-button, 122 | input::-webkit-inner-spin-button { 123 | -webkit-appearance: none; 124 | margin: 0; 125 | } 126 | 127 | input[type="number"] { 128 | -moz-appearance: textfield; 129 | } 130 | 131 | main div p { 132 | text-align: left; 133 | } 134 | 135 | main div p { 136 | font-size: 1.125rem; 137 | line-height: 1.75rem; 138 | color: rgb(51 65 85); 139 | } 140 | 141 | main div p span:first-child { 142 | font-weight: 500; 143 | } -------------------------------------------------------------------------------- /api/index.php: -------------------------------------------------------------------------------- 1 | ['timeout' => 8]]); 21 | $result = @file_get_contents($url, false, $context); 22 | if ($result === false) { 23 | json_response(['status' => 'error', 'msg' => 'Falha ao consultar serviço externo.'], 502); 24 | } 25 | $data = json_decode($result, true); 26 | if (! empty($data['nome'])) { 27 | json_response($data); 28 | } 29 | json_response([ 30 | 'status' => 'error', 31 | 'msg' => 'CNPJ não encontrado', 32 | ], 404); 33 | } 34 | 35 | function reqConsultaCPF($cpf) 36 | { 37 | // Essa API foi extraída de um site falso anunciado no Google. 38 | $url = "https://api.dataget.site/api/v1/cpf/$cpf"; 39 | $ch = curl_init($url); 40 | curl_setopt_array($ch, [ 41 | CURLOPT_URL => $url, 42 | CURLOPT_RETURNTRANSFER => true, 43 | CURLOPT_SSL_VERIFYPEER => false, 44 | CURLOPT_CUSTOMREQUEST => 'GET', 45 | CURLOPT_TIMEOUT => 10, 46 | CURLOPT_HTTPHEADER => [ 47 | "User-Agent: Mozilla/5.0 (Windows NT 12.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0", 48 | // USE ESSA KEY À VONTADE! 49 | "Authorization: Bearer 2e1228a7a34fb74cb5d91cfae27594ef07b0f03f92abe4611c94bc3fa4583765", 50 | ], 51 | ]); 52 | $result = curl_exec($ch); 53 | if ($result === false) { 54 | json_response(['status' => 'error', 'msg' => 'Falha ao consultar serviço externo.'], 502); 55 | } 56 | curl_close($ch); 57 | $resultToJSON = json_decode($result, true); 58 | if (isset($resultToJSON['CPF']) && !empty($resultToJSON['CPF'])) { 59 | $nome = $resultToJSON['NOME'] ?? 'Não informado'; 60 | $nasc = $resultToJSON['NASC'] ?? 'Não informado'; 61 | $nomeMae = $resultToJSON['NOME_MAE'] ?? 'Não informado'; 62 | $nomePai = (strlen($resultToJSON['NOME_PAI']) > 2) ? $resultToJSON['NOME_PAI'] : 'Não informado'; 63 | $sexo = $resultToJSON['SEXO'] ?? 'Não informado'; 64 | json_response([ 65 | 'status' => 'success', 66 | 'cpf' => $cpf, 67 | 'nome' => $nome, 68 | 'nasc' => $nasc, 69 | 'nomeMae' => $nomeMae, 70 | 'nomePai' => $nomePai, 71 | 'sexo' => $sexo, 72 | ]); 73 | } else { 74 | json_response([ 75 | 'status' => 'error', 76 | 'msg' => 'CPF não encontrado', 77 | ], 404); 78 | } 79 | } 80 | 81 | $input = json_decode(file_get_contents('php://input'), true); 82 | $cpf_cnpj = $input['cpf_cnpj'] ?? null; 83 | 84 | if (! $cpf_cnpj) { 85 | json_response([ 86 | 'status' => 'error', 87 | 'msg' => 'CPF/CNPJ não informado', 88 | ], 400); 89 | } 90 | 91 | $cpf_cnpj = filtrarCpfCnpj($cpf_cnpj); 92 | 93 | if (! ctype_digit($cpf_cnpj)) { 94 | json_response([ 95 | 'status' => 'error', 96 | 'msg' => 'Por favor, não aceitamos letras.', 97 | ], 422); 98 | } 99 | 100 | if (strlen($cpf_cnpj) == 14) { 101 | reqConsultaCNPJ($cpf_cnpj); 102 | } else if (strlen($cpf_cnpj) == 11) { 103 | reqConsultaCPF($cpf_cnpj); 104 | } else { 105 | json_response([ 106 | 'status' => 'error', 107 | 'msg' => 'Tamanho inválido para CPF ou CNPJ.', 108 | ], 422); 109 | } 110 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | SherlockBase 8 | 9 | 10 | 11 | 12 | 14 | 15 |
16 |
17 | 18 | 19 | 21 | 22 | 25 | 28 | 29 |

SherlockBase

30 |
31 |
32 | 33 |
34 |
35 | 36 |

Inteligência 37 | em busca de dados

38 |

Consulta avançada de CPF/CNPJ em tempo real.
Sua consulta 39 | em apenas um clique.

40 | 41 |
42 | 43 | 46 | 55 |
56 | 57 | 60 | 61 |
62 |
63 |
64 | 65 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /js/index.js: -------------------------------------------------------------------------------- 1 | let btn = document.getElementById("enviar"); 2 | 3 | btn.addEventListener("click", async (e) => { 4 | e.preventDefault(); 5 | 6 | let cpf_cnpj = document.getElementById("cpf_cnpj").value.trim(); 7 | cpf_cnpj = cpf_cnpj.replace(/\D/g, ""); 8 | 9 | let errDiv = document.getElementById("error"); 10 | let resultDiv = document.getElementById("result"); 11 | 12 | errDiv.classList.add("hidden"); 13 | resultDiv.innerHTML = ""; 14 | 15 | btn.disabled = true; 16 | btn.innerHTML = ` 17 | 18 | 19 | 20 | `; 21 | 22 | if (cpf_cnpj.length === 14 || cpf_cnpj.length === 11) { 23 | try { 24 | let reqApi = await fetch("api/", { 25 | method: "POST", 26 | headers: { 27 | Accept: "application/json", 28 | "Content-Type": "application/json", 29 | }, 30 | body: JSON.stringify({ cpf_cnpj: cpf_cnpj }), 31 | }); 32 | 33 | let respApi = await reqApi.json(); 34 | const cardBase = 35 | "glass border border-indigo-600 rounded-xl shadow-lg p-5 transition-all"; 36 | 37 | if (cpf_cnpj.length === 14) { 38 | if (respApi.status !== "error") { 39 | let socios = respApi.qsa?.[0]?.nome || "Não Informado"; 40 | let name = respApi.nome || "Não Informado"; 41 | let telefone = respApi.telefone || "Não Informado"; 42 | let porte = respApi.porte || "Não Informado"; 43 | let capital_social = respApi.capital_social || "Não Informado"; 44 | let email = respApi.email || "Não Informado"; 45 | resultDiv.innerHTML = ` 46 |
47 |

Razão Social:

48 |

${name}

49 |

E-mail:

50 |

${email}

51 |

Sócio Principal:

52 |

${socios}

53 |

Telefone:

54 |

${telefone}

55 |

Porte da Empresa:

56 |

${porte}

57 |

Capital Social:

58 |

R$ ${capital_social}

59 |
60 | `; 61 | } else { 62 | resultDiv.innerHTML = ` 63 |
64 |

Retorno:

65 |

${respApi.msg || "Erro ao consultar."}

66 |
67 | `; 68 | } 69 | } else if (cpf_cnpj.length === 11) { 70 | console.log(respApi); 71 | if (respApi.status !== "error") { 72 | resultDiv.innerHTML = ` 73 |
74 |

Nome:

75 |

${respApi.nome}

76 |

CPF:

77 |

${respApi.cpf}

78 |

Mãe:

79 |

${respApi.nomeMae}

80 |

Nascimento:

81 |

${respApi.nasc}

82 |

Pai:

83 |

${respApi.nomePai}

84 |

Sexo:

85 |

${respApi.sexo}

86 |
87 | `; 88 | } else { 89 | resultDiv.innerHTML = ` 90 |
91 |

Retorno:

92 |

${ 93 | respApi.msg || "Erro ao consultar." 94 | }

95 |
96 | `; 97 | } 98 | } 99 | } catch (error) { 100 | errDiv.classList.remove("hidden"); 101 | errDiv.innerHTML = `

Falha na consulta. Reporte ao suporte.

`; 102 | resultDiv.innerHTML = ""; 103 | console.error("Erro - Reporte no GIT:", error); 104 | } finally { 105 | btn.disabled = false; 106 | btn.innerHTML = ` 107 | 108 | 109 | `; 110 | } 111 | } else { 112 | errDiv.classList.remove("hidden"); 113 | errDiv.className = 114 | "glass border border-red-600 rounded-lg p-3 mt-5 mb-2 text-red-200 text-sm shadow-lg transition-all"; 115 | errDiv.innerHTML = `

Preencha corretamente as informações.

`; 116 | btn.disabled = false; 117 | btn.innerHTML = ` 118 | 119 | 120 | `; 121 | resultDiv.innerHTML = ""; 122 | } 123 | }); 124 | --------------------------------------------------------------------------------