Compare commits

..
5 Commits
Author SHA1 Message Date
pancake 40f784cd8c fix spaces 2021-06-17 00:31:44 +02:00
pancake e2cd0cd9e2 Fix indent 2021-06-17 00:30:14 +02:00
pancake 400c6d91bd fix lint 2021-06-17 00:29:02 +02:00
pancake 21aca1d8a5 Support var arg parsing 2021-06-17 00:27:09 +02:00
pancake a002a577b4 Implement r2env shell for unix 2021-06-17 00:15:20 +02:00
2 changed files with 3 additions and 10 deletions

No files matched your search

-3
View File
@@ -92,11 +92,8 @@ class R2Env:
def shell(self, cmd=""):
line = "export PS1=\"r2env\\$ \";export PATH=\"" + self._r2env_path + "/bin:$PATH\"; $SHELL -f"
if os.path.isfile("/default.prop"): # hack for pre-dtag builds of r2
line = "export LD_LIBRARY_PATH=\"" + self._r2env_path + "/lib\";" + line
if cmd.strip() == "":
return os.system(line)
print(os.system(line + " -c '" + cmd + "'"))
return os.system(line + " -c '" + cmd + "'")
@staticmethod
+3 -7
View File
@@ -94,13 +94,9 @@ class PackageManager:
def _build_using_acr(source_path, dst_path, logfile):
"""Only works in Unix systems"""
exit_if_not_exists(['make'])
print_console("[-] Building package using acr for Termux...")
extra_flags = ""
if os.path.isfile("/default.prop"):
extra_flags = " --with-compiler=termux"
cmd = "(cd {0} && rm -rf shlr/capstone && ./configure {1}" \
" --with-rpath --prefix={2} 2>&1 && make -j4 2>&1" \
"&& make install) > {3}".format(source_path, extra_flags, dst_path, logfile)
print_console("[-] Building package using acr ...")
cmd = "(cd {0} && rm -rf shlr/capstone && ./configure --with-rpath --prefix={1} 2>&1 && make -j4 2>&1" \
"&& make install) > {2}".format(source_path, dst_path, logfile)
return os.system(cmd) == 0
@staticmethod