-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
121 lines (103 loc) · 3.77 KB
/
index.html
File metadata and controls
121 lines (103 loc) · 3.77 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>RepoRecon</title>
<style>
body { font-family: Arial, sans-serif; margin: 20px; background: #f8f9fa; }
h1 { text-align: center; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
select, input { padding: 5px; font-size: 14px; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; background: #fff; }
th, td { border: 1px solid #ccc; padding: 8px; text-align: left; }
th { background: #007bff; color: #fff; }
tr:nth-child(even) { background: #f2f2f2; }
a { color: #007bff; text-decoration: none; }
</style>
</head>
<body>
<h1>RepoRecon</h1>
<p style="text-align: center; font-size: 18px; color: #555; max-width: 800px; margin: 10px auto 25px auto;">
Discover open-source repositories that are in scope for public bug bounty programs.
</p>
<div class="filters">
<select id="platformFilter">
<option value="">All Platforms</option>
</select>
<select id="hostFilter">
<option value="">All Hosts</option>
</select>
<input type="text" id="orgFilter" placeholder="Filter by Org">
<input type="text" id="repoFilter" placeholder="Filter by Repo Name">
</div>
<table>
<thead>
<tr>
<th>Platform</th>
<th>Program</th>
<th>Repo Host</th>
<th>Organization</th>
<th>Repository</th>
</tr>
</thead>
<tbody id="repoTable"></tbody>
</table>
<script>
let repos = [];
// Load repos.json (must be in same folder or use relative path)
fetch('data/repos.json')
.then(response => response.json())
.then(data => {
repos = data;
populateFilters();
renderTable(repos);
});
const platformFilter = document.getElementById('platformFilter');
const hostFilter = document.getElementById('hostFilter');
const orgFilter = document.getElementById('orgFilter');
const repoFilter = document.getElementById('repoFilter');
const repoTable = document.getElementById('repoTable');
function populateFilters() {
const platforms = [...new Set(repos.map(r => r.platform))].sort();
const hosts = [...new Set(repos.map(r => r.repo_host))].sort();
platforms.forEach(p => platformFilter.add(new Option(p, p)));
hosts.forEach(h => hostFilter.add(new Option(h, h)));
}
function renderTable(data) {
repoTable.innerHTML = '';
if (data.length === 0) {
repoTable.innerHTML = '<tr><td colspan="5">No repositories found.</td></tr>';
return;
}
data.forEach(r => {
const tr = document.createElement('tr');
tr.innerHTML = `
<td>${r.platform}</td>
<td><a href="${r.program_url}" target="_blank">${r.program}</a></td>
<td>${r.repo_host}</td>
<td>${r.org}</td>
<td><a href="${r.repo_url}" target="_blank">${r.repo_name || r.org}</a></td>
`;
repoTable.appendChild(tr);
});
}
function filterRepos() {
const platform = platformFilter.value.toLowerCase();
const host = hostFilter.value.toLowerCase();
const org = orgFilter.value.toLowerCase();
const repo = repoFilter.value.toLowerCase();
const filtered = repos.filter(r =>
(!platform || r.platform.toLowerCase() === platform) &&
(!host || r.repo_host.toLowerCase() === host) &&
(!org || r.org.toLowerCase().includes(org)) &&
(!repo || r.repo_name.toLowerCase().includes(repo))
);
renderTable(filtered);
}
platformFilter.addEventListener('change', filterRepos);
hostFilter.addEventListener('change', filterRepos);
orgFilter.addEventListener('input', filterRepos);
repoFilter.addEventListener('input', filterRepos);
</script>
</body>
</html>