Skip to content

Commit fc0e0ac

Browse files
committed
V1.1.6 - Edited Readme & new changelog
1 parent d3df0be commit fc0e0ac

File tree

4 files changed

+56
-16
lines changed

4 files changed

+56
-16
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
1. [**V1.1.6 - Edited Readme - `d3df0be`**](https://github.com/0xGrayy/malwareSniffer/commit/d3df0be198ba1e3065886103f477872420ab49b1)
2+
1. [**V1.1.6 - `61a8356`**](https://github.com/0xGrayy/malwareSniffer/commit/61a8356a51b669b86f5ace43318457ba9beee89e)
3+
1. [**V1.1.6 - `4cd543d`**](https://github.com/0xGrayy/malwareSniffer/commit/4cd543d59ff938dfd4959bab59a10b36db560f37)
4+
1. [**V1.1.5 - `1cdcbe2`**](https://github.com/0xGrayy/malwareSniffer/commit/1cdcbe2961a6419bb74fdbc0c8560b05316c72ce)
5+
1. [**v1.1.5 - `39d0eb2`**](https://github.com/0xGrayy/malwareSniffer/commit/39d0eb2b4b4e9077a1f8228eb024fda79364b3aa)
6+
1. [**Merge branch 'main' of https://github.com/RlxChap2/malwareSniffer - `ee4c642`**](https://github.com/0xGrayy/malwareSniffer/commit/ee4c6426694734dc3ef4fc3e11f27bcaba116315)
7+
1. [**1.1.5 - `b06ce82`**](https://github.com/0xGrayy/malwareSniffer/commit/b06ce820b35197620c5f4af2832e8413d250f7d4)
8+
1. [**Delete LICENCE - `913bfbc`**](https://github.com/0xGrayy/malwareSniffer/commit/913bfbc0c48e5bdbb30449cbd1df4b0c0c1ecd09)
9+
1. [**Create LICENSE - `dd2e72f`**](https://github.com/0xGrayy/malwareSniffer/commit/dd2e72fbde41e2b28ed7eba469a173e75fcdd236)
10+
1. [**Add files via upload - `171f191`**](https://github.com/0xGrayy/malwareSniffer/commit/171f191c642a298715513030cb1554098e16baf4)
11+
1. [**v1.1.0 - `15b0e7a`**](https://github.com/0xGrayy/malwareSniffer/commit/15b0e7aaf6046435835da5e649eaa5e524b0dda8)
12+
1. [**Initial commit - `72eaa52`**](https://github.com/0xGrayy/malwareSniffer/commit/72eaa521dbbb418bfead7c053da2248164172139)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ MIT Licensed - Go build something secure! 🛡️
101101

102102
---
103103

104-
Made with ❤️ by [[0xGrayy](https://github.com/0xGrayy), [RlxChap2](https://github.com/RlxChap2)] · [Report Issue](https://github.com/0xGrayy/malwareSniffer/issues)
104+
Made with ❤️ by [[0xGrayy](https://github.com/0xGrayy), [RlxChap2](https://github.com/RlxChap2)] · [Report Issue](https://github.com/0xGrayy/malwareSniffer/issues)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"start": "node dist/index.js",
99
"autobuild": "npx tsc -w",
1010
"autostart": "cls && npx tsc && node dist/index.js",
11-
"push": "git add . && git commit -m \"V1.1.6 - Edited Readme\" && git push",
11+
"push": "git add . && git commit -m \"V1.1.6 - Edited Readme & new changelog\" && git push",
1212
"changelog": "git log --pretty=format:\"1. [**%s - `%h`**](https://github.com/0xGrayy/malwareSniffer/commit/%H)\" > CHANGELOG.md"
1313
},
1414
"keywords": [],

src/virusTotal.ts

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,28 @@ import * as dotenv from "dotenv";
33
import chalk from "chalk";
44
import cliProgress from "cli-progress";
55
import figlet from "figlet";
6-
import moment from "moment";
6+
import moment from "moment";
77

88
dotenv.config();
99

1010
const VIRUSTOTAL_API_KEY = process.env.VIRUSTOTAL_API_KEY;
1111

1212
if (!VIRUSTOTAL_API_KEY) {
13-
throw new Error(chalk.red.bold("❌ Missing VirusTotal API Key in .env file!"));
13+
throw new Error(
14+
chalk.red.bold("❌ Missing VirusTotal API Key in .env file!")
15+
);
1416
}
1517

1618
export async function scanUrl(url: string): Promise<void> {
1719
try {
18-
console.log(chalk.blue.bold(figlet.textSync("Malware Sniffer", { horizontalLayout: "full" })));
19-
console.log(chalk.blue.bold(`\n🚀 Starting URL Scan: ${chalk.underline(url)}\n`));
20+
console.log(
21+
chalk.blue.bold(
22+
figlet.textSync("Malware Sniffer", { horizontalLayout: "full" })
23+
)
24+
);
25+
console.log(
26+
chalk.blue.bold(`\n🚀 Starting URL Scan: ${chalk.underline(url)}\n`)
27+
);
2028

2129
const startTime = moment();
2230

@@ -73,7 +81,9 @@ export async function scanUrl(url: string): Promise<void> {
7381
progressBar.stop();
7482

7583
const engines = scanResults.results;
76-
const detectedEngines = Object.values(engines).filter((res: any) => res.category === "malicious").length;
84+
const detectedEngines = Object.values(engines).filter(
85+
(res: any) => res.category === "malicious"
86+
).length;
7787
const totalEngines = Object.keys(engines).length;
7888
const safeScore = ((totalEngines - detectedEngines) / totalEngines) * 100;
7989

@@ -84,13 +94,26 @@ export async function scanUrl(url: string): Promise<void> {
8494
console.log(chalk.gray(`🕒 Scan Duration: ${duration} seconds`));
8595
console.log(chalk.green.bold(`🔹 Total Engines Checked: ${totalEngines}`));
8696
console.log(chalk.red.bold(`🔸 Malicious Detections: ${detectedEngines}`));
87-
console.log(chalk.yellow.bold(`🟡 Suspicious Engines: ${Object.values(engines).filter((res: any) => res.category === "suspicious").length}`));
97+
console.log(
98+
chalk.yellow.bold(
99+
`🟡 Suspicious Engines: ${
100+
Object.values(engines).filter(
101+
(res: any) => res.category === "suspicious"
102+
).length
103+
}`
104+
)
105+
);
88106
console.log(chalk.green.bold(`✅ Safe Score: ${safeScore.toFixed(2)}%`));
89107

90108
console.log("\n📈 " + chalk.bold("Detection Chart:"));
91-
console.log(chalk.green("🟩".repeat(Math.round(safeScore / 10))) + chalk.red("🟥".repeat(Math.round((100 - safeScore) / 10))));
109+
console.log(
110+
chalk.green("🟩".repeat(Math.round(safeScore / 10))) +
111+
chalk.red("🟥".repeat(Math.round((100 - safeScore) / 10)))
112+
);
92113
console.log(chalk.green.bold(`Safe: ${safeScore.toFixed(2)}%`));
93-
console.log(chalk.red.bold(`Malicious: ${(100 - safeScore).toFixed(2)}%\n`));
114+
console.log(
115+
chalk.red.bold(`Malicious: ${(100 - safeScore).toFixed(2)}%\n`)
116+
);
94117

95118
console.log(chalk.bold("🔍 Detailed Results:"));
96119
Object.entries(engines).forEach(([engine, data]: any) => {
@@ -99,9 +122,9 @@ export async function scanUrl(url: string): Promise<void> {
99122
case "malicious":
100123
categoryColor = chalk.red.bold("🛑 Malicious");
101124
break;
102-
case "harmless":
103-
categoryColor = chalk.green.bold("✅ Harmless");
104-
break;
125+
case "harmless":
126+
categoryColor = chalk.green.bold("✅ Harmless");
127+
break;
105128
case "suspicious":
106129
categoryColor = chalk.yellow.bold("⚠️ Suspicious");
107130
break;
@@ -117,11 +140,16 @@ export async function scanUrl(url: string): Promise<void> {
117140
});
118141

119142
if (detectedEngines > 0) {
120-
console.log(chalk.red.bold("\n⚠️ WARNING: This URL is potentially unsafe!"));
143+
console.log(
144+
chalk.red.bold("\n⚠️ WARNING: This URL is potentially unsafe!")
145+
);
121146
} else {
122147
console.log(chalk.green.bold("\n✅ This URL appears safe!"));
123148
}
124149
} catch (err: any) {
125-
console.error(chalk.red.bold("❌ Error:"), err.response?.data || err.message);
150+
console.error(
151+
chalk.red.bold("❌ Error:"),
152+
err.response?.data || err.message
153+
);
126154
}
127-
}
155+
}

0 commit comments

Comments
 (0)