bockelson / jsunpack-n

Automatically exported from code.google.com/p/jsunpack-n
GNU General Public License v2.0
0 stars 0 forks source link

control characters in extracted URL's cause jsunpack to fail #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.provide html file containing url with control characters
ie: <script src="[insert any with control characters]">
2. run jsunpack

What is the expected output? What do you see instead?
Expect jsunpack to run without fatal error, instead I see error output 
including:
File "../../../urlattr.py", line 27
  if os.path.exists(input):
  ^ 
What version of the product are you using? On what operating system?
Latest on Linux Redhat

Please provide any additional information below.

Believe the solution is to wrap the call to "os.path.exists(input)" in a 
try/catch block. It doesn't appear to matter if this call fails as it only 
appears to be looking for the supplied file on the filesystem, and I don't know 
that such files can contain control characters.

Original issue reported on code.google.com by mmatt...@gmail.com on 23 Dec 2011 at 2:25