-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathCopy-OpenBugBounty-URLs.user.js
More file actions
95 lines (83 loc) · 3.07 KB
/
Copy-OpenBugBounty-URLs.user.js
File metadata and controls
95 lines (83 loc) · 3.07 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
// ==UserScript==
// @name Copy OpenBugBounty URLs
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Copy OpenBugBounty program URLs to clipboard
// @author You
// @match https://www.openbugbounty.org/bugbounty-list/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=openbugbounty.org
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to copy text to clipboard
function copyToClipboard(text) {
const textarea = document.createElement('textarea');
textarea.value = text;
document.body.appendChild(textarea);
textarea.select();
document.execCommand('copy');
document.body.removeChild(textarea);
}
// Function to get OpenBugBounty URLs and copy to clipboard
function copyBugBountyURLs() {
const rows = document.querySelectorAll('tbody tr');
let urls = [];
rows.forEach(row => {
const link = row.querySelector('td:first-child a');
if (link) {
const href = link.getAttribute('href');
if (href && href.startsWith('/bugbounty/')) {
const fullUrl = 'https://www.openbugbounty.org' + href;
urls.push(fullUrl);
}
}
});
if (urls.length > 0) {
const urlsText = urls.join('\n');
copyToClipboard(urlsText);
alert('Copied ' + urls.length + ' OpenBugBounty URLs to clipboard!');
// Optional: Log to console as well
console.log('=== COPIED OPENBUGBOUNTY URLS ===');
console.log(urlsText);
} else {
alert('No OpenBugBounty URLs found!');
}
}
// Create the button
const button = document.createElement('button');
button.textContent = 'Copy BugBounty URLs';
button.style.position = 'fixed';
button.style.top = '150px';
button.style.right = '10px';
button.style.zIndex = '1000';
button.style.padding = '10px 20px';
button.style.backgroundColor = '#007bff';
button.style.color = 'white';
button.style.border = 'none';
button.style.borderRadius = '5px';
button.style.cursor = 'pointer';
button.style.textAlign = 'center';
button.style.display = 'flex';
button.style.justifyContent = 'center';
button.style.alignItems = 'center';
button.style.fontSize = '14px';
button.style.fontWeight = 'bold';
// Add hover effects
button.addEventListener('mouseenter', function() {
button.style.backgroundColor = '#0056b3';
});
button.addEventListener('mouseleave', function() {
button.style.backgroundColor = '#007bff';
});
// Add the button to the body
document.body.appendChild(button);
// Add event listener to the button
button.addEventListener('click', copyBugBountyURLs);
// Optional: Auto-run when page loads
window.addEventListener('load', function() {
setTimeout(function() {
console.log('OpenBugBounty URL copy button ready!');
}, 1000);
});
})();