问题描述
我正在使用逆向工程工具 angr 做一些工作,我正在尝试在容器中运行它。 我当前的目录如下所示:
ask@Garsy:~/Notes/ethHack/wetransfer-85179d/Export$ ls
angry.py impossible_password_location.csv report.md
impossible_password.bin impossible_password_strings.txt test.txt
ask@Garsy:~/Notes/ethHack/wetransfer-85179d/Export$ sudo docker run -it --rm -v $pwd:/local angr/angr
我认为使用 $pwd:/local
应该可以让我访问容器内之前显示的文件(遵循 [this][1] 指南 [5:40])。
我运行容器,并尝试编写一些python:
(angr) angr@38b067fffc2d:~$ ipython3
Python 3.8.5 (default,Jan 27 2021,15:41:15)
Type 'copyright','credits' or 'license' for more information
IPython 7.22.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import angr
In [2]: angr.Project("/impossible_password.bin")
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-2-3f794a899665> in <module>
----> 1 angr.Project("/impossible_password.bin")
~/angr-dev/angr/angr/project.py in __init__(self,thing,default_analysis_mode,ignore_functions,use_sim_procedures,exclude_sim_procedures_func,exclude_sim_procedures_list,arch,simos,engine,load_options,translation_cache,support_selfmodifying_code,store_function,load_function,analyses_preset,concrete_target,**kwargs)
124 self.loader = cle.Loader(thing,**load_options)
125 elif not isinstance(thing,str) or not os.path.exists(thing) or not os.path.isfile(thing):
--> 126 raise Exception("Not a valid binary file: %s" % repr(thing))
127 else:
128 # use angr's loader,provided by cle
Exception: Not a valid binary file: '/impossible_password.bin'
找不到文件的地方。 local/impossible_password.bin"
也是如此。当我启动容器时,如何使当前目录的文件可用?
[1]:https://www.youtube.com/watch?v=9dQFM5O4KFk
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)