Skip to content

Should assert files are accessible prior to opening them #56

Open
@strazzere

Description

@strazzere
[30%]diff@rocksteady:[arxan] $ apkid .
[+] APKiD 1.0.0 :: from RedNaga :: rednaga.io
Traceback (most recent call last):
  File "/Users/diff/Library/Python/2.7/bin/apkid", line 9, in <module>
    load_entry_point('apkid==1.0.0', 'console_scripts', 'apkid')()
  File "/Users/diff/repo/APKiD/apkid/__init__.py", line 60, in main
    apkid.scan(input, args.timeout, args.json)
  File "/Users/diff/repo/APKiD/apkid/apkid.py", line 176, in scan
    for file_type, file_path in collect_files(input):
  File "/Users/diff/repo/APKiD/apkid/apkid.py", line 76, in collect_files
    file_type = get_file_type(filepath)
  File "/Users/diff/repo/APKiD/apkid/apkid.py", line 54, in get_file_type
    with open(file_path, 'rb') as f:
IOError: [Errno 13] Permission denied: './01cd1c7b1054518a1f5fdf1345767604d074a26135a3f9cc719788e32ee74d5d'

The file was not RW - my mistake, however, we should present a better error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions