Benign netbsd Download

doclifter-2.22 2.22

“Translates documents written in troff macros to DocBook”

Executes shell commands via PythonImports Python's subprocess module
SHA-2565f34c9892302ba3ee5e44e637dfa28b6b26051b64f7c84c6623485afc335f386

Evidence

Python imports top-level commands module lines 9–27
9:33rough 8 by default.
10#
11# SPDX-FileCopyrightText: Copyright Eric S. Raymond <[email protected]>
12# SPDX-License-Identifier: BSD-2-Clause
13
14import sys, os, getopt, signal, time, re, subprocess, stat
15import _thread, threading, queue
16
17try:
18 getstatusoutput = subprocess.getstatusoutput
19 getoutput = subprocess.getoutput
20except AttributeError:
21 import commands
22
23 getstatusoutput = commands.getstatusoutput
4 lines
Contains an HTML document string literal lines 56–64
56:14log annotations based on content."
57 exclusions = (
58 ("<html>", "HTML"),
59 ("auto-generated by docbook2man-spec", "DocBook"),
60 ("automatically generated by docbook2man", "DocBook"),
61 ("Generated by db2man.xsl", "XML DocBook"),
62 ("Automatically generated by Pod::Man", "Pod::Man"),
63 ("Man page generated from reStructeredText", "reStructuredText"),
64 ("Man page generated from reStructuredText", "r
Python latin-1 bytes decode call lines 69–87
69:33", "latex2man"),
70 )
71 output = ""
72 fp = open(manpage, "rb")
73 text = fp.read().decode("latin-1")
74 for pattern, generator in exclusions:
75 if text.find(pattern) > -1:
7 lines
83 output = ""
84 if file[-3:] == ".gz":
85 cstat = os.system("gunzip <%s >%s" % (file, localcopy))
86 elif file[-4:] == ".bz2":
87 cstat = os.system("bunzip2 <%s >%s" % (file, localcopy
Compiles a set of Python regex patterns lines 128–141
128:15None
129 if doclifter_status == 2:
130 fp = open(source)
131 contents = fp.read()
132 inclusions = re.compile(r"\.so\s+(.*)").search(contents)
133 fp.close()
134 if inclusions:
135 lxmlloc = os.path.join(outdir, getstem(inclusions.group(1)) + ".xml")
136 return (2, lxmlloc, output)
137 return (doclifter_status, None, output)
4 lines
Python joins dot-prefixed path lines 242–252
242:30dir, "man" + section)
243 stem = getstem(withsect)
244 xmlloc = os.path.join(subdir, stem + ".xml")
245 # Count patches here so our stats won't be off
246 patch = os.path.join(patchdir, withsect + ".patch")
247 if os.path.exists(patch):
248 patched += 1
4 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.