-
Notifications
You must be signed in to change notification settings - Fork 63
/
1.js
49 lines (47 loc) · 1.12 KB
/
1.js
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
const dates = [
'2023-06-02',
// '2023-06-03',
// '2023-06-04',
// '2023-06-09',
// '2023-06-10',
// '2023-06-11',
// '2023-06-15',
// '2023-06-16',
// '2023-06-17',
// '2023-06-18',
// '2023-06-23',
// '2023-06-24',
// '2023-06-25',
];
const acronyms = [
// 'NBI',
// 'NBIOC',
// 'BLC',
// 'OC',
// 'ICEP',
'ICRR',
];
function dateToString(date) {
return [
(date.getFullYear() + '').padStart(4, '0'),
(date.getMonth() + '').padStart(2, '0'),
(date.getDate() + '').padStart(2, '0'),
].join('-');
}
// for (const date of dates) {
let date = new Date(2023, 6, 1);
while (date.getMonth() < 11) {
for (const acronym of acronyms) {
fetch(
'http://202.38.93.111:12345/',
{
"method": "POST",
"headers": {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
},
"body": btoa(`Answer1=${dateToString(date)}&Answer2=${acronym}`) + '.txt',
}
);
}
date.setDate(date.getDate() + 1);
}