Skip to content

Instantly share code, notes, and snippets.

@dvygolov
Created August 3, 2019 17:37
Show Gist options
  • Save dvygolov/37c2408cbd41f84174219f5e20114f69 to your computer and use it in GitHub Desktop.
Save dvygolov/37c2408cbd41f84174219f5e20114f69 to your computer and use it in GitHub Desktop.
Скрипты для работы с Freenom
//Freenom scripts
//Add all sites to cart
javascript: (function () {
var buttons = document.querySelectorAll('a.addSelect.getItNow.borderRadius');
buttons.forEach(function (btn) {
btn.click();
});
})();
//Change ip and register period
javascript: (function () {
function registerWithIpChange(ip) {
var periodSelect = document.querySelectorAll('select.select_period');
periodSelect.forEach(function (s) {
s.value = "6M";
});
var useDnsBtns = document.querySelectorAll('div.freenomBtn.useDNS');
useDnsBtns.forEach(function (b) {
b.click();
});
var ips = document.querySelectorAll('input.hostip_input');
ips.forEach(function (inpip) {
inpip.value = ip;
});
var continueBtn = document.getElementById('configure_submit_button');
continueBtn.click();
}
var ipToInput = prompt("Какой ip сервера?", "194.67.218.230");
registerWithIpChange(ipToInput);
})();
//Alert today domains
javascript: (function () {
var nowDate = new Date();
var month = "" + (nowDate.getMonth() + 1);
if (month.length == 1)
month = "0" + month;
var day = "" + nowDate.getDate();
if (day.length == 1)
day = "0" + day;
var date = day + '/' + month + '/' + nowDate.getFullYear();
console.log(date);
var rows = document.querySelectorAll('tr');
var domains = "";
rows.forEach(function (row) {
if (row.innerText.includes(date)) {
domains += row.querySelector(':scope td.second').innerText + '\r\n';
}
});
prompt('Domains', domains.trimRight('\r\n'));
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment