mirror of
https://github.com/horsicq/Detect-It-Easy.git
synced 2026-06-24 01:54:08 +00:00
63 lines
1.4 KiB
Text
63 lines
1.4 KiB
Text
/**
|
|
* The type of the signature. For example <code>compiler</code> or <code>packer</code>.
|
|
*/
|
|
var sType;
|
|
/**
|
|
* The name of the signature.
|
|
*/
|
|
var sName;
|
|
/**
|
|
* The version of the signature.
|
|
*/
|
|
var sVersion;
|
|
/**
|
|
* Options used by the signature.
|
|
*/
|
|
var sOptions;
|
|
/**
|
|
* The flag to indicate the signature was found.
|
|
*/
|
|
var bDetected;
|
|
|
|
/**
|
|
* Initialize a signature.
|
|
* @param {String} [sType="unknown"] - The signature type.
|
|
* @param {String} [sName="unknown"] - The signature name.
|
|
* @param {String} [sVersion=""] - The signature version.
|
|
* @param {String} [sOptions=""] - The signature options.
|
|
*/
|
|
function init()
|
|
{
|
|
sType=arguments[0]?arguments[0]:"unknown";
|
|
sName=arguments[1]?arguments[1]:"unknown";
|
|
sVersion=arguments[2]?arguments[2]:"";
|
|
sOptions=arguments[3]?arguments[3]:"";
|
|
bDetected=0;
|
|
}
|
|
|
|
|
|
/**
|
|
* Append one or more strings, separating with ",".
|
|
* @param {...String} sString - String to append.
|
|
* @returns {String} The new string.
|
|
* @global
|
|
* @example
|
|
* sOptions=sOptions.append("debug");
|
|
*/
|
|
String.prototype.append = function()
|
|
{
|
|
var s=this.valueOf();
|
|
if(arguments.length>0)
|
|
{
|
|
if(s)
|
|
{
|
|
s+=",";
|
|
}
|
|
s+=arguments[0];
|
|
for(var i=1;i<arguments.length;i++)
|
|
{
|
|
s+=","+arguments[i];
|
|
}
|
|
}
|
|
return s;
|
|
}
|