projects
/
gnucomo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
557b5de
)
Removed debug output.
author
arjen
<arjen>
Wed, 21 Nov 2007 15:14:26 +0000
(15:14 +0000)
committer
arjen
<arjen>
Wed, 21 Nov 2007 15:14:26 +0000
(15:14 +0000)
src/gcm_input/spamdetect.cpp
patch
|
blob
|
history
diff --git
a/src/gcm_input/spamdetect.cpp
b/src/gcm_input/spamdetect.cpp
index
5f55790
..
8ee5621
100644
(file)
--- a/
src/gcm_input/spamdetect.cpp
+++ b/
src/gcm_input/spamdetect.cpp
@@
-7,7
+7,7
@@
***********************
** FILE NAME : spamdetect.cpp
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
***********************
** FILE NAME : spamdetect.cpp
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.
1
$
+** VERSION NUMBER : $Revision: 1.
2
$
**
** DESCRIPTION :
**
**
** DESCRIPTION :
**
@@
-25,14
+25,17
@@
/*****************************
$Log: spamdetect.cpp,v $
/*****************************
$Log: spamdetect.cpp,v $
- Revision 1.1 2007-11-14 16:20:05 arjen
+ Revision 1.2 2007-11-21 15:14:26 arjen
+ Removed debug output.
+
+ Revision 1.1 2007/11/14 16:20:05 arjen
New program: spamdetect.
Expirimental utility to log manually reported spam and have
Gnucomo detect the spammer's IP address.
*****************************/
New program: spamdetect.
Expirimental utility to log manually reported spam and have
Gnucomo detect the spammer's IP address.
*****************************/
-static const char *RCSID = "$Id: spamdetect.cpp,v 1.
1 2007-11-14 16:20:05
arjen Exp $";
+static const char *RCSID = "$Id: spamdetect.cpp,v 1.
2 2007-11-21 15:14:26
arjen Exp $";
#include <fstream>
#include <AXE/String.h>
#include <fstream>
#include <AXE/String.h>
@@
-58,14
+61,12
@@
int main(int argc, char *argv[])
while (std::cin >> line)
{
while (std::cin >> line)
{
- std::cout << line << "\n";
switch (state)
{
case 0:
if (line == fwd_header)
{
state = 1;
switch (state)
{
case 0:
if (line == fwd_header)
{
state = 1;
- std::cout << "Forward header detected.\n";
}
break;
}
break;
@@
-75,34
+76,28
@@
int main(int argc, char *argv[])
{
header = line;
state = 2;
{
header = line;
state = 2;
- std::cout << "(1)Header = " << header << "\n";
}
break;
case 2:
if (line == regex("^[^ ]+: "))
{
}
break;
case 2:
if (line == regex("^[^ ]+: "))
{
- std::cout << "Logging " << header << "\n";
syslog(LOG_WARNING, "%s", (char *)header);
header = "";
state = 1;
syslog(LOG_WARNING, "%s", (char *)header);
header = "";
state = 1;
- std::cout << "Next header.\n";
if (line == received || line == from || line == returnpath)
{
header = line;
state = 2;
if (line == received || line == from || line == returnpath)
{
header = line;
state = 2;
- std::cout << "(1)Header = " << header << "\n";
}
}
else if (line == String(""))
{
}
}
else if (line == String(""))
{
- std::cout << "End of headers detected.\n";
state = 3;
}
else
{
header += " ";
header += line;
state = 3;
}
else
{
header += " ";
header += line;
- std::cout << "(2)Header = " << header << "\n";
}
}
}
}
}
}