Skip to content

Instantly share code, notes, and snippets.

@sijad
Last active March 23, 2019 17:06
Show Gist options
  • Save sijad/3454a362ed6d9f4a7f401f7f6d1b225d to your computer and use it in GitHub Desktop.
Save sijad/3454a362ed6d9f4a7f401f7f6d1b225d to your computer and use it in GitHub Desktop.
follow all hackerone programs, open https://hackerone.com/hacktivity, paste and run this code in your browser console
fetch('https://hackerone.com/current_user')
.then(res => res.json())
.then(user => {
fetch('https://hackerone.com/programs/search?query=type%3Ahackerone&sort=published_at%3Adescending&page=1&limit=1000')
.then(res => res.json())
.then(res => res.results)
.then(res => res.forEach((r, i) => {
setTimeout(() => {
var url = `https://hackerone.com${r.url}/policy_subscriptions`;
fetch(url)
.then(res => res.json())
.then(res => {
if (!res.subscription) {
fetch(url, {
method: 'PATCH',
headers:{
'x-csrf-token': user.csrf_token,
},
});
}
});
}, 1000 * i);
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment