View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000299 | file | General | public | 2021-11-12 08:24 | 2021-11-13 17:48 |
| Reporter | adepasquale | Assigned To | christos | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 5.41 | ||||
| Fixed in Version | 5.42 | ||||
| Summary | 0000299: Separate magic for uuencode and xxencode | ||||
| Description | Current file 5.41 doesn't distinguish between uuencode and xxencode. I have updated the magic files based on existing comments, see attached patch. Note that some archivers (e.g. https://wiki.powerarchiver.com/en:help:main:tools:uuencode_xxencode_mime_base64_yenc) do not have the "begin " keyword at zero, so I had to use a regex/1024. | ||||
| Tags | magic | ||||
|
|
uuencode.patch (1,276 bytes)
diff --git a/magic/Magdir/uuencode b/magic/Magdir/uuencode
index 78444684..d4c7d3b1 100644
--- a/magic/Magdir/uuencode
+++ b/magic/Magdir/uuencode
@@ -4,13 +4,13 @@
# uuencode: file(1) magic for ASCII-encoded files
#
-# GRR: the first line of xxencoded files is identical to that in uuencoded
-# files, but the first character in most subsequent lines is 'h' instead of
-# 'M'. (xxencoding uses lowercase letters in place of most of uuencode's
-# punctuation and survives BITNET gateways better.) If regular expressions
-# were supported, this entry could possibly be split into two with
-# "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
-0 search/1 begin\ uuencoded or xxencoded text
+# The first line of xxencoded files is identical to that in uuencoded files,
+# but the first character in most subsequent lines is 'h' instead of 'M'.
+0 regex/1024 \^begin\040[0-7]{3}\040
+>&0 regex/256 [\012\015]+M[\040-\140]{60}[\012\015]+ uuencoded text
+>&0 regex/256 [\012\015]+h[0-9A-Za-z\053\055]{60}[\012\015]+ xxencoded text
+>&0 default x uuencoded or xxencoded text
+>&0 string >\0 \b, file name "%s"
# btoa(1) is an alternative to uuencode that requires less space.
0 search/1 xbtoa\ Begin btoa'd text
|
|
|
Applied, thanks! |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2021-11-12 08:24 | adepasquale | New Issue | |
| 2021-11-12 08:24 | adepasquale | File Added: uuencode.patch | |
| 2021-11-12 08:24 | adepasquale | Tag Attached: magic | |
| 2021-11-13 17:48 | christos | Assigned To | => christos |
| 2021-11-13 17:48 | christos | Status | new => assigned |
| 2021-11-13 17:48 | christos | Status | assigned => resolved |
| 2021-11-13 17:48 | christos | Resolution | open => fixed |
| 2021-11-13 17:48 | christos | Fixed in Version | => 5.42 |
| 2021-11-13 17:48 | christos | Note Added: 0003668 |