-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexample.php
More file actions
43 lines (35 loc) · 1.2 KB
/
example.php
File metadata and controls
43 lines (35 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
#######################################################
##
## Projekt: X-ARF
## Datei: example.php
## Version: 1.2
## Datum: 12.12.2011
## Copyright: Martin Schiftan
## license: http://opensource.org/licenses/gpl-license.php GNU Public License
##
#######################################################
require_once('./genxarf.class.php');
$ip = '89.149.xxx.xxx';
$host = 'geht auch mit gethostbyaddr($ip)';
$datum = time(); # oder date('D, d M Y H:i:s O');
$dienst = 'ssh'; # wie im Array $config['dienste']
$logs = 'logfiles/Spam-Mail/Header....';
// Ohne $class->logs wird das 3 Attachment nicht generiert und Attachment in 2. auf No gestellt.
$xarf = new xarf($config);
$xarf->ip = $ip;
$xarf->host = $host;
$xarf->datum = $datum;
$xarf->dienst = $dienst;
$xarf->logs = $logs;
$xarf->xarfreporttyp = $config['xarfreporttyp']; # wird auf YES gestellt, wenn nicht V0.2
$header = $xarf->genheader();
$body = $xarf->genbody();
$subject = $xarf->getsubject();
# braucht man natuerlich nicht, ist nur zum zeigen/debug :-)
echo $header;
echo "\n\n";
echo $body;
echo "\n\n";
# hier report senden:
mail($to, $subject, $body, $header);