Skip to content

Commit

Permalink
Remove some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hansott committed Feb 27, 2024
1 parent 9de3ded commit 964c21d
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 47 deletions.
22 changes: 17 additions & 5 deletions benchmarks/sql-injection/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* Runs benchmarks for the detection of SQL Injections
* @module
*/
const fs = require("fs");
const path = require("path");
Expand All @@ -23,6 +22,7 @@ function main() {
);
}
}

main();

function runBenchmark(sql, input) {
Expand Down Expand Up @@ -55,19 +55,31 @@ function getAvgBenchmark() {
*/
function fetchSqlStatements() {
const auth_bypass_txt = fs.readFileSync(
path.join(__dirname, "./../../library/testing/sql-injection-payloads/Auth_Bypass.txt"),
path.join(
__dirname,
"./../../library/testing/sql-injection-payloads/Auth_Bypass.txt"
),
"utf-8"
);
const postgres_txt = fs.readFileSync(
path.join(__dirname, "./../../library/testing/sql-injection-payloads/postgres.txt"),
path.join(
__dirname,
"./../../library/testing/sql-injection-payloads/postgres.txt"
),
"utf-8"
);
const mysql_txt = fs.readFileSync(
path.join(__dirname, "./../../library/testing/sql-injection-payloads/mysql.txt"),
path.join(
__dirname,
"./../../library/testing/sql-injection-payloads/mysql.txt"
),
"utf-8"
);
const mssql_and_db2_txt = fs.readFileSync(
path.join(__dirname, "./../../library/testing/sql-injection-payloads/mssql_and_db2.txt"),
path.join(
__dirname,
"./../../library/testing/sql-injection-payloads/mssql_and_db2.txt"
),
"utf-8"
);

Expand Down
5 changes: 0 additions & 5 deletions library/src/agent/AgentSingleton.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* This module contains a variable instance, and methods to get and set the current agent
* @module agent/AgentSingleton
*/

import { Agent } from "./Agent";

let instance: Agent | undefined = undefined;
Expand Down
6 changes: 0 additions & 6 deletions library/src/agent/Logger.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/**
* Exports 2 classes related to logging
* + Type definition Logger
* @module agent/Logger
*/

export interface Logger {
log(message: string): void;
}
Expand Down
5 changes: 0 additions & 5 deletions library/src/agent/Source.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* Exports type def Source but mainly the function {@link friendlyName}
* @module agent/Source
*/

export type Source = "query" | "body" | "headers" | "cookies";

/**
Expand Down
5 changes: 0 additions & 5 deletions library/src/agent/Wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* Type definitions
* @module agent/Wrapper
*/

export interface Wrapper {
wrap(): void;
}
5 changes: 0 additions & 5 deletions library/src/helpers/getOptions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* This module contains the default options and the function {@link getOptions}
* @module helpers/getOptions
*/

/**
* It gets the options for an Agent
* @param partialOptions Your own values which will overwrite the default options
Expand Down
5 changes: 0 additions & 5 deletions library/src/helpers/getPackageVersion.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* The getPackageVersion module exports only one function : {@link getPackageVersion}
* @module helpers/getPackageVersion
*/

/**
* Get the installed version of a package
* @param pkg A package name
Expand Down
1 change: 0 additions & 1 deletion library/src/helpers/isPlainObject.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* Grabbed from https://github.com/jonschlinkert/is-plain-object
* @module helpers/isPlainObject
*/

function isObject(o: unknown) {
Expand Down
5 changes: 0 additions & 5 deletions library/src/helpers/satisfiesVersion.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* The satisfiesVersion module exports only one function with the same name : satisfiesVersion
* @module helpers/satisfiesVersion
*/

/**
* This function checks if a certain version satisfies a version range.
* @param range A range of versions written in semver
Expand Down
5 changes: 0 additions & 5 deletions library/src/helpers/tryDecodeAsJWT.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* The JWT module only exports one function : tryDecodeAsJWT
* @module helpers/JWT
*/

/**
* This function tries to decode your input as if it is a JSON Web Token, if it fails to do so it returns {jwt: false}.
* @param jwt A (possible) JWT
Expand Down

0 comments on commit 964c21d

Please sign in to comment.