messageviewer
scamdetection.cpp
Go to the documentation of this file.
28 static QString IPv4_PATTERN = QLatin1String("\\b[0-9]{1,3}\\.[0-9]{1,3}(?:\\.[0-9]{0,3})?(?:\\.[0-9]{0,3})?");
105 details += QLatin1String("<li>") + i18n("This email contains a link which reads as '%1' in the text, but actually points to '%2'. This is often the case in scam emails to mislead the recipient", addWarningColor(title), addWarningColor(href)) + QLatin1String("</li>");
112 if (hostname.contains(ip4regExp) && !hostname.contains(QLatin1String("127.0.0.1"))) { //hostname
113 details += QLatin1String("<li>") + i18n("This email contains a link which points to a numerical IP address (%1) instead of a typical textual website address. This is often the case in scam emails.", addWarningColor(hostname))+QLatin1String("</li>");
116 details += QLatin1String("<li>") + i18n("This email contains a link which points to a hexadecimal IP address (%1) instead of a typical textual website address. This is often the case in scam emails.", addWarningColor(hostname))+QLatin1String("</li>");
119 details += QLatin1String("<li>") + i18n("This email contains a link (%1) which has a redirection", addWarningColor(url.toString())) +QLatin1String("</li>");
124 details += QLatin1String("<li>") + i18n("This email contains a link (%1) which contains multiple http://. This is often the case in scam emails.", addWarningColor(url.toString())) + QLatin1String("</li>");
132 details += QLatin1String("<li>") + i18n("This email contains a shorturl (%1). It can redirect to another server.", addWarningColor(url.toString())) + QLatin1String("</li>");
139 details += QLatin1String("<li></b>") + i18n("Message contains form element. This is often the case in scam emails.") + QLatin1String("</b></li>");
QWebElement documentElement() const
QString host() const
QString toString(QFlags< QUrl::FormattingOption > options) const
int count() const
void clear()
void setPattern(const QString &pattern)
void messageMayBeAScam()
static bool isShortUrl(const KUrl &url)
Definition: scamcheckshorturl.cpp:102
void scanPage(QWebFrame *frame)
Definition: scamdetection.cpp:50
ScamDetection(QObject *parent=0)
Definition: scamdetection.cpp:35
bool isEmpty() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QString scheme() const
static bool scanFrame(const QWebElement &rootElement, QString &details)
Definition: scamdetection.cpp:74
QString attribute(const QString &name, const QString &defaultValue) const
bool contains(QChar ch, Qt::CaseSensitivity cs) const
QList< QWebFrame * > childFrames() const
ScamCheckShortUrl * scamCheckShortUrl() const
Definition: scamdetection.cpp:45
int count() const
QString fromLatin1(const char *str, int size)
QWebElementCollection findAll(const QString &selectorQuery) const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.