mirror of
https://github.com/kristuff/abuseipdb
synced 2025-08-20 13:33:14 -07:00
initial commit
This commit is contained in:
parent
2048183464
commit
eff0ac03cb
3 changed files with 11 additions and 4 deletions
|
@ -4,6 +4,8 @@
|
||||||
see [kristuff/abuseipdb-cli](https://github.com/kristuff/abuseipdb-cli) for the CLI version
|
see [kristuff/abuseipdb-cli](https://github.com/kristuff/abuseipdb-cli) for the CLI version
|
||||||
|
|
||||||
|
|
||||||
|
***under construction, for now, just check part is implemented***
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
- PHP >= 7.1
|
- PHP >= 7.1
|
||||||
|
|
|
@ -87,7 +87,7 @@ abstract class ApiDefintion
|
||||||
'hack' => ['15', 'Hacking', false],
|
'hack' => ['15', 'Hacking', false],
|
||||||
|
|
||||||
// Attempts at SQL injection.
|
// Attempts at SQL injection.
|
||||||
'sql' => ['16', 'SQL Injection'], true,
|
'sql' => ['16', 'SQL Injection', true],
|
||||||
|
|
||||||
// Email sender spoofing.
|
// Email sender spoofing.
|
||||||
'spoof' => ['17', 'Spoofing', true],
|
'spoof' => ['17', 'Spoofing', true],
|
||||||
|
|
|
@ -79,7 +79,9 @@ class ApiManager extends ApiDefintion
|
||||||
return array(
|
return array(
|
||||||
'userId' => $this->aipdbUserId,
|
'userId' => $this->aipdbUserId,
|
||||||
'apiKey' => $this->aipdbApiKey,
|
'apiKey' => $this->aipdbApiKey,
|
||||||
'selfIps' => $this->selfIps,
|
|
||||||
|
// TODO 'selfIps' => $this->selfIps,
|
||||||
|
// TODO default report cat
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,11 +94,14 @@ class ApiManager extends ApiDefintion
|
||||||
*
|
*
|
||||||
* @return \Kristuff\AbuseIPDB\ApiManager
|
* @return \Kristuff\AbuseIPDB\ApiManager
|
||||||
*/
|
*/
|
||||||
public static function fromConfigstring(string $configPath)
|
public static function fromConfigFile(string $configPath)
|
||||||
{
|
{
|
||||||
//todo check file exist
|
//todo check file exist
|
||||||
$config = self::loadJsonFile($configPath);
|
$config = self::loadJsonFile($configPath);
|
||||||
return new ApiManager($config->api_key, $config->user_id, $config->self_ips);
|
|
||||||
|
// TODO $config->self_ips
|
||||||
|
// TODO other options
|
||||||
|
return new ApiManager($config->api_key, $config->user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue