使用 epub2pdf 是否会带来潜在的安全风险?还有其他选择吗?

使用 epub2pdf 是否会带来潜在的安全风险?还有其他选择吗?

epub2pdf是一个相当独立于平台的程序。它基于 Java,在我的机器上执行顺利,没有依赖性。

然而,奇怪的是,该程序需要有效的互联网连接才能正常工作。一开始我并没有意识到这一点,并且该程序的网站没有表明该程序只是“在线”转换器的前端。

这正常吗?

这不是侵犯隐私吗?

为什么这个程序会需要与外部服务器建立 HTTP 连接?

此外,该程序在 Debian/Ubuntu 存储库中不可用。

这与这个问题有什么关系吗?

有人可以提出替代方案吗?

这是在没有互联网连接的情况下运行它时出现的错误:

me@ROOROO:~/epub2pdf$ ./epub2pdf.sh adventures_in_dev_null.epub 
epub2pdf v0.5 - Copyright (C) 2010  Brendan C. Lefebvre
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
See file 'COPYING' for full license and warranty details.


Registered font families: courier, helvetica, symbol, times, times-roman, zapfdingbats
Default font set to helvetica
Default font base size set to 12.0pt
Default monospace font: courier
Monospace base size: 10.0pt
Default paragraph alignment: left
Margins (top right bottom left): 4.00mm 4.00mm 4.00mm 4.00mm 
Page size (w x h): 90.00mm x 115.00mm
Converting ~/epub2pdf/adventures_in_dev_null.epub
java.net.UnknownHostException: www.daisy.org
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
        at sun.net.www.http.HttpClient.New(HttpClient.java:321)
        at sun.net.www.http.HttpClient.New(HttpClient.java:338)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at com.amphisoft.epub.metadata.Ncx.fromFile(Unknown Source)
        at com.amphisoft.epub.Epub.populateMemberFields(Unknown Source)
        at com.amphisoft.epub.Epub.setFile(Unknown Source)
        at com.amphisoft.epub.Epub.setFile(Unknown Source)
        at com.amphisoft.epub.Epub.fromFile(Unknown Source)
        at com.amphisoft.epub2pdf.Converter.convert(Unknown Source)
        at com.amphisoft.epub2pdf.Converter.main(Unknown Source)
        at com.amphisoft.epub2pdf.Epub2Pdf.main(Unknown Source)
Writing PDF to /home/user/adventures_in_dev_null.pdf
Processing 22 HTML file(s): 
.java.net.UnknownHostException: www.w3.org
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
        at sun.net.www.http.HttpClient.New(HttpClient.java:321)
        at sun.net.www.http.HttpClient.New(HttpClient.java:338)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:654)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1292)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1229)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.startPE(XMLDTDScannerImpl.java:699)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.skipSeparator(XMLDTDScannerImpl.java:2046)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls(XMLDTDScannerImpl.java:2009)
            at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExternalSubset(XMLDTDScannerImpl.java:297)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1178)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1065)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:978)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
        at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
        at org.apache.xml.resolver.tools.ResolvingXMLFilter.parse(ResolvingXMLFilter.java:141)
        at com.amphisoft.epub2pdf.content.XhtmlHandler.parseXhtml(Unknown Source)
        at com.amphisoft.epub2pdf.content.XhtmlHandler.<init>(Unknown Source)
        at com.amphisoft.epub2pdf.content.XhtmlHandler.process(Unknown Source)
        at com.amphisoft.epub2pdf.Converter.convert(Unknown Source)
        at com.amphisoft.epub2pdf.Converter.main(Unknown Source)
        at com.amphisoft.epub2pdf.Epub2Pdf.main(Unknown Source)
Exception converting adventures_in_dev_null.epub:
        ExceptionConverter at:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at com.amphisoft.epub2pdf.Converter.main(Unknown Source)
        at com.amphisoft.epub2pdf.Epub2Pdf.main(Unknown Source)

答案1

查看 Java 源代码,这些联系似乎是良性的。他们的目的是找回DOMDTD程序处理的书籍类型的文件。 Z39.86例如,是一个数字有声读物规范。作为一名程序员,将这种网络依赖项放入应用程序而不是捆绑所需的文件对我来说似乎很奇怪,但可能存在我不知道的版权或许可问题。

相关内容