-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
23 lines (21 loc) · 751 Bytes
/
Copy pathindex.js
File metadata and controls
23 lines (21 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const axios = require('axios')
const generateKey = require('./generate_key')
const conf = require('./conf')
const account = '' // Advanced => Diagnostics => ID
const token = '7e28adde-5031-4259-912f-6dcb6a211dfb' // Token Authorization (debug request pls change :v)
const main = async () => {
let key = await generateKey()
let req = await axios.patch(`https://api.cloudflareclient.com/v0a2158/reg/${account}`, JSON.stringify({
"key": key.publicKey
}), {
headers: {
'Content-Type': 'application/json; charset=UTF-8',
'User-Agent': 'okhttp/3.12.1',
'Authorization': `Bearer ${token}`
}
}
)
let data = await req.data
console.log(conf({ ...data, ...key }))
}
main()