-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
56 lines (49 loc) · 4.43 KB
/
index.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
50
51
52
53
54
55
56
const colors = require('colors');
const chalk = require('chalk');
const fs = require('fs');
const prompt = require(`prompt`);
const blocked = [...new Set(require('fs').readFileSync('blockedwords.txt', 'utf-8').replace(/\r/g, '').split('\n'))];
var blocks = 0;
process.on('uncaughtException', e => {});
process.on('uncaughtRejection', e => {});
process.warn = () => {};
function send(block, title){
if(title.includes(block)){
console.log(chalk.hex("#FF7F50")(`[WARN] Title Includes Blocked Word │ Blocked Word: ${block}`));
blocks++;
process.title = `[313] YT Title Checker │ Title: "${title}" │ Blocks: ${blocks}`;
}
else{return;}
}
function printAsciiLogo() {
console.log(`
${chalk.yellow('┌───────────────────────────────────────────────────────────────────────────────────────────────────┐')}
${chalk.yellow('│')} ${chalk.red('████████╗██╗████████╗██╗ ███████╗ ')}${chalk.hex('#FFFAFA')(' ██████╗██╗ ██╗███████╗ ██████╗██╗ ██╗███████╗██████╗ ')} ${chalk.yellow('│')}
${chalk.yellow('│')} ${chalk.red('╚══██╔══╝██║╚══██╔══╝██║ ██╔════╝ ')}${chalk.hex('#FFFAFA')(' ██╔════╝██║ ██║██╔════╝██╔════╝██║ ██╔╝██╔════╝██╔══██╗')} ${chalk.yellow('│')}
${chalk.yellow('│')} ${chalk.red(' ██║ ██║ ██║ ██║ █████╗ ')}${chalk.hex('#FFFAFA')(' ██║ ███████║█████╗ ██║ █████╔╝ █████╗ ██████╔╝')} ${chalk.yellow('│')}
${chalk.yellow('│')} ${chalk.red(' ██║ ██║ ██║ ██║ ██╔══╝ ')}${chalk.hex('#FFFAFA')(' ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗ ██╔══╝ ██╔══██╗')} ${chalk.yellow('│')}
${chalk.yellow('│')} ${chalk.red(' ██║ ██║ ██║ ███████╗███████╗ ')}${chalk.hex('#FFFAFA')(' ╚██████╗██║ ██║███████╗╚██████╗██║ ██╗███████╗██║ ██║')} ${chalk.yellow('│')}
${chalk.yellow('│')} ${chalk.red(' ╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝ ')}${chalk.hex('#FFFAFA')(' ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝')} ${chalk.yellow('│')}
${chalk.yellow('│')} ${chalk.underline("Coded by Luci")} ${chalk.yellow('│')}
${chalk.yellow('└───────────────────────────────────────────────────────────────────────────────────────────────────┘')}
`);
}
process.title = `[313] YT Title Checker │ Made by Luci`;
printAsciiLogo();
console.log(`[INFO]: Please Enter the Title of Your Youtube Video!`.inverse);
console.log(`[WARN]: Please be warned! Filter is very sensitive e.g "hello" will trigger due to it including "hell"`.inverse);
prompt.start();
prompt.get(['title'], function(err, result) { console.log('');
const title = result.title.toLowerCase();
process.title = `[YT Title Checker] Title │ "${title}" │ Blocks: ${blocks}`;
console.log(`[INFO] Title │ ${title}`.inverse);
blocked.forEach(block => send(block, title));
if(blocks == 0){
console.log(chalk.hex("66ff00")(`[PASS] Title "${title}" Contains no Blocked Words`.inverse));
}
else{
console.log(chalk.hex("#FF0000")(`[FAILED] Title "${title}" Contains "${blocks}" Blocked Words`.inverse));
}
});
//Updates Coming Soon!
//Please subscribe to my channel c: https://youtube.com/Luciii