Skip to content

Instantly share code, notes, and snippets.

...
elseif dmarc_policy == 'reject' then
if not pct or pct == 100 or (math.random(100) <= pct) then
task:insert_result(dmarc_symbols['reject'], res, lookup_domain .. ' : ' .. reason_str, dmarc_policy)
disposition = "reject"
end
else
...
...
if dmarc_policy == 'quarantine' then
if not pct or pct == 100 or (math.random(100) <= pct) then
task:insert_result(dmarc_symbols['quarantine'], res, lookup_domain .. ' : ' .. reason_str, dmarc_policy)
disposition = "quarantine"
end
...
@cpragadeesh
cpragadeesh / sample_scores
Last active July 20, 2017 13:57
Sample scores
FAKE_REPLY: 1.34
URI_COUNT_ODD: 1.17
HAS_XOIP: -0.32
INVALID_FROM_8BIT: 9.16
SUSPICIOUS_RECIPS: 1.42
CT_EXTRA_SEMI: 0.51
BROKEN_HEADERS: 15.32
HAS_X_PRIO_FIVE: -0.56
TO_EXCESS_BASE64: 1.63
MID_RHS_IP_LITERAL: 1.11
@cpragadeesh
cpragadeesh / sample results
Created July 24, 2017 19:27
sample rescore results
epoch: 99 | error: 0.0519916767862 4
Statistics:
Time taken: 9.25s
Pre-rescore test data stats:
Accuracy: 69.85 %
F-score: 0.577464788732
Post-rescore test data stats:
rspamc output:
Results for file: rar4.eml (0.000 seconds)
HTTP error: 500, invalid command:
rspamc strace:
execve("/usr/local/bin/rspamc", ["rspamc", "rar4.eml", "/home/pragadeesh/output.txt"], [/* 61 vars */]) = 0
brk(NULL) = 0x1ffd000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
#include "LinkedList.cpp"
#include <utility>
#include <typeinfo>
using namespace std;
template<class key_type, class value_type>
class HashTable {
const int size;
SYMBOL OLD SCORE NEW SCORE
FAKE_REPLY 1.0 0.69
URI_COUNT_ODD 1.0 1.77
INVALID_FROM_8BIT 6.0 6.82
SUSPICIOUS_RECIPS 1.5 2.06
CT_EXTRA_SEMI 1.0 1.65
BROKEN_HEADERS 10.0 11.6
HAS_X_PRIO_FIVE 0.0 0.22
TO_EXCESS_BASE64 1.5 1.26
MID_RHS_IP_LITERAL 0.5 1.14
# current error = 0.5285708144281
# current error = 0.52857081431571
.
.
.
# StochasticGradient: you have reached the maximum number of iterations
# training error = 0.52857081431571
SYMBOL OLD_SCORE NEW_SCORE
R_MIXED_CHARSET 5 4.65
SYMBOL OLD_SCORE NEW_SCORE
R_MIXED_CHARSET 5 5.43
FORGED_MUA_THEBAT_BOUN 2 0.44
FORGED_MUA_THEBAT_MSGID_UNKNOWN 3 17.22
MID_BARE_IP 2 -5.16
FROM_EXCESS_BASE64 1.5 3.21
SUBJ_ALL_CAPS 3 20.95
FAKE_REPLY_C 6 2.69
TO_DOM_EQ_FROM_DOM 0 9.70
R_BAD_CTE_7BIT 4 22.36
SYMBOL OLD_SCORE NEW_SCORE
R_MIXED_CHARSET 5 3.69
FORGED_MUA_THEBAT_BOUN 2 0.43
FORGED_MUA_THEBAT_MSGID_UNKNOWN 3 1.52
MID_BARE_IP 2 0.64
FROM_EXCESS_BASE64 1.5 1.71
SUBJ_ALL_CAPS 3 1.56
FAKE_REPLY_C 6 2.69
TO_DOM_EQ_FROM_DOM 0 3.69
R_BAD_CTE_7BIT 4 5.56