New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

netget

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netget - npm Package Compare versions

Comparing version 2.3.59 to 2.3.71

3

package.json
{
"name": "netget",
"version": "2.3.59",
"version": "2.3.71",
"description": "Rette Adepto/ Recibido Directamente.",

@@ -33,2 +33,3 @@ "type": "module",

"commander": "^12.0.0",
"express": "^4.19.2",
"inquirer": "^9.2.17",

@@ -35,0 +36,0 @@ "morgan": "^1.10.0",

@@ -56,21 +56,38 @@ //src/gateway.js

this.app.use((req, res) => {
const hostname = req.hostname || req.headers['host'];
const fullUrl = `${req.hostname || req.headers['host']}${req.url}`;
let handler = null;
// Iterate over the routes to find a match
Object.keys(this.routes).forEach(pattern => {
if (pattern === hostname) {
// Direct hostname match
handler = this.routes[pattern];
} else if (pattern.startsWith('*.')) {
// Wildcard domain match
const baseDomain = pattern.slice(2);
if (hostname.endsWith(baseDomain) && (hostname.split('.').length === baseDomain.split('.').length + 1)) {
handler = this.routes[pattern];
// Check for exact match first (full URL)
Object.keys(this.routes).some(pattern => {
const regexPattern = new RegExp(`^${pattern.replace(/\*/g, '.*')}$`); // Convert pattern to regex, replacing * with .*
if (regexPattern.test(fullUrl)) {
handler = this.routes[pattern];
return true; // Stop iteration once match is found
}
}
return false;
});
// Use the found handler or fallback to default
// If no handler found, check if there's a more general match or use default
if (!handler) {
// Extract hostname for broader match
const hostname = req.hostname || req.headers['host'];
Object.keys(this.routes).some(pattern => {
if (pattern === hostname) {
handler = this.routes[pattern];
return true;
} else if (pattern.startsWith('*.')) {
const baseDomain = pattern.slice(2);
if (hostname.endsWith(baseDomain) && (hostname.split('.').length === baseDomain.split('.').length + 1)) {
handler = this.routes[pattern];
return true;
}
}
return false;
});
}
// Fallback to default if no specific handler is found
handler = handler || defaultRoutes;
handler(req, res);
});
});

@@ -77,0 +94,0 @@

@@ -34,3 +34,3 @@ // netget_MainMenu.js

case 'NetGetX':
console.log(chalk.blue('Initializing NetGetX v0.0.0...'));
console.log(chalk.blue('Initializing NetGetX v0.0.1...'));
try {

@@ -37,0 +37,0 @@ const setupVerified = await i_DefaultNetGetX();

//i_DefaultNetGetX.js
import chalk from 'chalk';
import os from 'os';
import { verifyNginxInstallation } from './verifyNginxInstallation.js';

@@ -10,2 +11,12 @@ import { nginxInstallationOptions } from './nginxInstallationOptions.cli.js';

console.log(chalk.blue('Running Enviroment Check...'));
// Get the operating system platform
const platform = os.platform(); // possible values are 'darwin', 'win32','linux', etc.
// Get the operating system name
const type = os.type(); // possible values are 'Linux', 'Darwin', 'Windows_NT', etc.
// Get the operating system release
const release = os.release();
// Output the information
console.log(`Operating System: ${type} (${platform})`);
console.log(`Release: ${release}`);
// Check for public IP first

@@ -22,3 +33,3 @@ const publicIP = await checkPublicIP();

// Verify NGINX installation and configuration
let nginxVerified = await verifyNginxInstallation();
let nginxVerified = await verifyNginxInstallation(); // from './verifyNginxInstallation.js';

@@ -30,3 +41,3 @@ if (!nginxVerified) {

// Recheck after installation options might have changed the state
nginxVerified = await verifyNginxInstallation();
nginxVerified = await verifyNginxInstallation();
if (!nginxVerified) {

@@ -33,0 +44,0 @@ console.log(chalk.red('NGINX installation or configuration still incorrect after attempted fixes.'));

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc