Re: QR phish missed

Alex <[email protected]>
Newsgroups gmane.mail.spam.spamassassin.general
Message-ID <CAB1R3shLPegdN1LM9JBJ19XWYsy348dtyteYZWcSUt8a3+eCuw@mail.gmail.com>
>
>
> dbg: extracttext: [3209409] (/usr/bin/zbarimg) finished: exit 1
> dbg: extracttext: [3209409] (/usr/bin/zbarimg) stderr output: execvp
> failed, errno = 2 (No such file or directory)
> warn: extracttext: error from /usr/bin/zbarimg, please verify
> configuration: execvp failed, errno = 2 (No such file or directory)
>
> but zbarimg is very much at that location:
> # ls -l /usr/bin/zbarimg
> -rwxr-xr-x 1 root root 28344 Apr 14 20:00 /usr/bin/zbarimg
>
> # QR-code decoder
> extracttext_external    zbar            /usr/bin/zbarimg -q -D {}
> extracttext_use         zbar            .jpg .png .pdf .webp
> image/(?:jpeg|png) application/pdf
> add_header              all             ExtractText-Uris _EXTRACTTEXTURIS_
>
> This is also a bit different than the example provided in ExtractText.pm.
> This happens when I run SA on an email as root:
>
> # spamassassin -t -D extracttext < buck-qr-code.eml
>
> # spamassassin --version
> SpamAssassin version 4.0.2-r1919157
>   running on Perl version 5.38.2
>

It seems I was missing Ghostscript and ImageMagick on this system:

# /usr/bin/zbarimg -q -D zbar-image.pdf
execvp failed, errno = 2 (No such file or directory)
Magick: "gs" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE"
"-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r900x900"
"-sOutputFile=/tmp/gmgtZP0F" "--" "/t
mp/gmlfC5a5" "-c" "quit".
ERROR: Postscript delegate failed (zbar-image.pdf)

Afterwards installing, it extracts the URL, but takes 13s on a E5-2623 v4 @
2.60GHz fedora40 system to do it:

# time /usr/bin/zbarimg -q -D zbar-image.pdf
QR-Code:
https://lookerstudio.google.com/reporting/7c7d2b18-6e83-4c3c-a275-2eb2e105fa6a?bHN0cmFuZEBidWNra25pdmVzLmNvbQ==

real    0m13.361s
user    0m12.640s
sys     0m1.933s

So it looks like it kills it because it takes too long when running it
through SA?
dbg: extracttext: killed stale helper [3229331] (/usr/bin/zbarimg)
info: extracttext: [3229331] (/usr/bin/zbarimg) error: exit 15
dbg: extracttext: [3229331] (/usr/bin/zbarimg) stderr output: Magick:
quitting due to signal 51 (SIGTERM) "Terminated"...

Is there a way to control the timeout value? Or a more optimal method?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.