-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathold.index.html
149 lines (139 loc) · 6.75 KB
/
old.index.html
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html>
<!--
* Time convert (and how to work with timestamps and its importance)
* IP check'er
* Mail check'er
* Reverse guide?
* Playbooks; File, process; ip, mail, network event, http(s) without dns, windows event.
* Different files: macros, exe
* Network event: port.
(* Dark theme)
-->
<head>
<link rel="stylesheet" href="style.css" />
<script>
const interval = setInterval(() => {
// Live epoch time
document.getElementById('date-time').innerHTML = Math.floor(Date.now()/1000);
// Convert epoch time
var unixEpochTimeMS = parseInt(document.getElementById("unixEpochTime").value) * 1000;
var date = new Date(unixEpochTimeMS);
document.getElementById('UTC-time').innerHTML =
date.getUTCFullYear() + "-" +
("0" + (date.getUTCMonth()+1)).slice(-2) + "-" +
("0" + date.getUTCDate()).slice(-2) + " " +
("0" + date.getUTCHours()).slice(-2) + ":" +
("0" + date.getUTCMinutes()).slice(-2) + ":" +
("0" + date.getUTCSeconds()).slice(-2) + " UTC";
document.getElementById('ISO8601-time').innerHTML =
date.getUTCFullYear() + "-" +
("0" + (date.getUTCMonth()+1)).slice(-2) + "-" +
("0" + date.getUTCDate()).slice(-2) + "T" +
("0" + date.getUTCHours()).slice(-2) + ":" +
("0" + date.getUTCMinutes()).slice(-2) + ":" +
("0" + date.getUTCSeconds()).slice(-2) + "Z";
// IP checker
document.getElementById("vt-link").innerHTML = "https://www.virustotal.com/gui/ip-address/" + document.getElementById("ipv4").value
document.getElementById("abuse-link").innerHTML = "https://www.abuseipdb.com/check/" + document.getElementById("ipv4").value
document.getElementById("lytics-link").innerHTML = "https://dnslytics.com/ip/" + document.getElementById("ipv4").value
}, 100);
// Copy text to clipboard
function copyText(timeElement, cpMsg) {
var valueToCopy = document.getElementById(timeElement).innerHTML;
navigator.clipboard.writeText(valueToCopy);
document.getElementById(cpMsg).innerHTML = "✅";
setTimeout(() => { document.getElementById(cpMsg).innerHTML = ""; }, 1000);
}
function openLink(link) {
var linktest = document.getElementById(link).innerHTML
window.open(linktest, "_blank")
}
var pagePointer = "home"
function switchPage(page) {
if (page !== pagePointer) {
var pageToDisplay = document.getElementById(page);
var currentPage = document.getElementById(pagePointer);
currentPage.style.display = "none";
pageToDisplay.style.display = "block";
pagePointer = page;
}
}
function toggleSubNav(subNav) {
console.log(subNav)
var dropdownContent = document.getElementById(subNav);
if (dropdownContent.style.display === "block") {
dropdownContent.style.display = "none";
} else {
dropdownContent.style.display = "block";
}
}
</script>
</head>
<body>
<header>
Blue Army Knife
</header>
<div id="main">
<nav>
<a href="#home" onclick="switchPage('home')">Home</a>
<a href="#epoch" onclick="switchPage('epoch')">Epoch time</a>
<a href="#ip-checker" onclick="switchPage('ip-checker')">IP checker</a>
<br>
<a href='#playbooks'>Playbooks aaa</a>
<div class="sub-nav" id="sub-nav-playbooks">
<a href="#">IP address</a>
<a href="#">File</a>
<a href="#">Process</a>
<a href="#">Mail</a>
</div>
</nav>
<article>
<div class="container" id="home">
<p> THIS IS THE HOMEPAGE </p>
<p>aaa</p>
aaaaaaa
aaaa
</div>
<div class="container" id="epoch">
<h1>Epoch time converter</h1>
<div class="item">
<p>Current Epoch time: <span id="date-time"></span></p>
<input type="text" size="16" maxlength="20" id="unixEpochTime" placeholder="Epoch time..." value="" spellcheck="false" autocomplete="off" autofocus>
<p>
Readable: <a id="UTC-time"></a>
<button type="button" onclick="copyText('UTC-time', 'UTC-cpy-msg')">Copy</button>
<a id="UTC-cpy-msg"></a>
</p>
<p>
ISO 8601: <span id="ISO8601-time"></span>
<button type="button" onclick="copyText('ISO8601-time', 'ISO-cpy-msg')">Copy</button>
<span id="ISO-cpy-msg"></span>
</p>
</div>
</div>
<div class="container" id="ip-checker">
<h1>IP checker</h1>
<div class="item">
<p>Enter an IPv4 address to get usefull links</p>
<input type="text" size="16" maxlength="15" id="ipv4" placeholder="IPv4 address..." value="" spellcheck="false" autocomplete="off">
<p>
VirusTotal: <a id="vt-link"></a>
<button type="button" onclick="openLink('vt-link')">Open in new tab</button>
</p>
<p>
AbuseIPDB: <a id="abuse-link"></a>
<button type="button" onclick="openLink('abuse-link')">Open in new tab</button>
</p>
<p>
DNSlytics: <a id="lytics-link"></a>
<button type="button" onclick="openLink('lytics-link')">Open in new tab</button>
</p>
</div>
</div>
</article>
</div>
<footer>
<a href="https://github.com/MarcusLenander" target="_blank" rel="noopener noreferrer">GitHub</a>
</footer>
</body>
</html>