Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

haraka-plugin-dcc

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haraka-plugin-dcc - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.eslintrc.yaml

6

Changes.md

@@ -0,2 +1,8 @@

### Unreleased
# 1.0.2 - 2022-06-06
- ci: use shared GHA workflows
# 1.0.1 - 2018-08-25

@@ -3,0 +9,0 @@

32

index.js

@@ -11,3 +11,3 @@ // dcc client

exports.load_dcc_ini = function () {
let plugin = this;
const plugin = this;
plugin.cfg = plugin.config.get('dcc.ini', () => {

@@ -47,3 +47,3 @@ plugin.load_dcc_ini();

exports.get_result = function (c, result) {
let plugin = this;
const plugin = this;

@@ -79,3 +79,3 @@ // Get result code

exports.get_disposition = function (c, disposition) {
let plugin = this;
const plugin = this;

@@ -96,7 +96,7 @@ switch (disposition) {

exports.get_request_headers = function (conn, training) {
let plugin = this;
let txn = conn.transaction;
let host = plugin.get_host(conn.remote.host);
const plugin = this;
const txn = conn.transaction;
const host = plugin.get_host(conn.remote.host);
let headers = [
const headers = [
'header' + training,

@@ -115,3 +115,3 @@ conn.remote.ip + ((host) ? '\r' + host : ''),

// Read headers
let headers = [];
const headers = [];
for (let i=0; i<rl.length; i++) {

@@ -129,3 +129,3 @@ if (/^\s/.test(rl[i]) && headers.length) {

for (let h=0; h<headers.length; h++) {
let header = headers[h].toString('utf8').trim();
const header = headers[h].toString('utf8').trim();
let match;

@@ -144,6 +144,6 @@ if ((match = /^([^: ]+):\s*((?:.|[\r\n])+)/.exec(header))) {

exports.hook_data_post = function (next, connection) {
let plugin = this;
const plugin = this;
// Fix-up rDNS for DCC
let training = plugin.should_train(connection.transaction);
const training = plugin.should_train(connection.transaction);
let response = '';

@@ -160,3 +160,3 @@ let client;

let c = plugin.cfg.dccifd;
const c = plugin.cfg.dccifd;
if (c.path) {

@@ -178,3 +178,3 @@ client = net.createConnection(c.path, onConnect);

.on('end', function () {
var rl = response.split("\n");
const rl = response.split("\n");
if (rl.length < 2) {

@@ -186,5 +186,5 @@ connection.logwarn(plugin, 'invalid response: ' + response + 'length=' + rl.length);

let result = plugin.get_result(connection, rl.shift());
let disposition = plugin.get_disposition(connection, rl.shift());
let headers = plugin.get_response_headers(connection, rl);
const result = plugin.get_result(connection, rl.shift());
const disposition = plugin.get_disposition(connection, rl.shift());
const headers = plugin.get_response_headers(connection, rl);

@@ -191,0 +191,0 @@ connection.transaction.results.add(plugin, {

{
"name": "haraka-plugin-dcc",
"version": "1.0.1",
"version": "1.0.2",
"description": "Haraka plugin that scans messages with DCC",
"main": "index.js",
"scripts": {
"lint": "./node_modules/.bin/eslint *.js test/**/*.js",
"lintfix": "./node_modules/.bin/eslint --fix *.js test/**/*.js",
"cover": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha",
"test": "./node_modules/.bin/_mocha"
"lint": "npx eslint *.js test",
"lintfix": "npx eslint --fix *.js test",
"test": "npx mocha"
},

@@ -28,7 +27,7 @@ "repository": {

"devDependencies": {
"eslint": ">=3",
"eslint": ">=8",
"eslint-plugin-haraka": "*",
"haraka-test-fixtures": "*",
"mocha": "*"
"mocha": ">=9"
}
}
[![Build Status][ci-img]][ci-url]
[![Windows Build Status][ci-win-img]][ci-win-url]
[![Code Climate][clim-img]][clim-url]
[![Greenkeeper badge][gk-img]][gk-url]
[![NPM][npm-img]][npm-url]

@@ -35,12 +33,6 @@

<!-- leave these buried at the bottom of the document -->
[ci-img]: https://travis-ci.org/haraka/haraka-plugin-dcc.svg
[ci-url]: https://travis-ci.org/haraka/haraka-plugin-dcc
[ci-win-img]: https://ci.appveyor.com/api/projects/status/m0ema14m4e5vy3al?svg=true
[ci-win-url]: https://ci.appveyor.com/project/haraka/haraka-m0ema14m4e5vy3al
[cov-img]: https://codecov.io/github/haraka/haraka-plugin-dcc/coverage.svg
[cov-url]: https://codecov.io/github/haraka/haraka-plugin-dcc
[ci-img]: https://github.com/haraka/haraka-plugin-dcc/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-dcc/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-dcc/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-dcc
[gk-img]: https://badges.greenkeeper.io/haraka/haraka-plugin-dcc.svg
[gk-url]: https://greenkeeper.io/
[npm-img]: https://nodei.co/npm/haraka-plugin-dcc.png

@@ -47,0 +39,0 @@ [npm-url]: https://www.npmjs.com/package/haraka-plugin-dcc

Sorry, the diff of this file is not supported yet

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