-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
31 lines (24 loc) · 946 Bytes
/
Copy pathindex.php
File metadata and controls
31 lines (24 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
// Caminho do arquivo JSON
$jsonFile = 'cat.json';
// Carregar e decodificar o conteúdo do arquivo JSON
$jsonData = json_decode(file_get_contents($jsonFile), true);
// Verificar se a decodificação foi bem-sucedida
if ($jsonData === null) {
die("Erro ao decodificar o arquivo JSON.");
}
// Inicializar uma string para armazenar as dorks da categoria "Footholds"
$footholdsDorks = "";
// Percorrer os dados e extrair as dorks da categoria "Footholds"
foreach ($jsonData['data'] as $entry) {
if (in_array("1", $entry['cat_id'])) {
$dork = strip_tags($entry['url_title']); // Remover tags HTML
$footholdsDorks .= $dork . PHP_EOL; // Adicionar a dork à string com uma nova linha
}
}
// Caminho do arquivo de saída
$outputFile = 'Footholds';
// Escrever as dorks no arquivo de saída
file_put_contents($outputFile, $footholdsDorks);
echo "Dorks da categoria 'Footholds' foram salvas em: $outputFile\n";
?>