View Issue Details

IDProjectCategoryView StatusLast Update
0005154Kali Linux[All Projects] Kali Package Improvementpublic2019-05-21 13:40
Reporterradualexandrupopescu Assigned Tosbrun  
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Versionkali-dev 
Target VersionFixed in Version 
Summary0005154: smbmap launch script causes files to be downloaded in wrong directory
DescriptionThe script that actually launches smbmap.py (the one from [packages/smbmap.git] / debian / helper-script / smbmap) first changes directory to "/usr/share/smbmap" and than calls the smbmap.py script.
This has adverse effects when using the "--download" flag (https://github.com/ShawnDEvans/smbmap/blob/master/smbmap.py#L802) because the function (download_file https://github.com/ShawnDEvans/smbmap/blob/master/smbmap.py#L635) actually uses "os.getcwd" (https://github.com/ShawnDEvans/smbmap/blob/master/smbmap.py#L642) to create the download file; this results in the downloaded file landing somewhere in "/usr/share/smbmap".

One quick fix would be to drop the "cd" part and just use 'python /usr/share/smbmap/smbmap.py "$@"'.
Another way would be just to sim-link '/usr/share/smbmap/smbmap.py' in '/usr/bin/smbmap', as the py file is already marked as executable.
Steps To Reproduce1. Change to a working directory
cd /root/tests/smbmap

2. Download a file using smbmap
smbmap -u myuser -p mypass -d workgroup -H DESKTOP-HELPDESK --download 'C$\\temp\\passwords.txt'

3. Observe the file missing from /root/tests/smbmap
4. Locate the file in /usr/share/smbmap/

Activities

sbrun

2019-05-21 13:40

manager   ~0010598

fix in version 1.0.5+git20180508-2

Issue History

Date Modified Username Field Change
2018-12-13 01:22 radualexandrupopescu New Issue
2019-05-21 13:40 sbrun Assigned To => sbrun
2019-05-21 13:40 sbrun Status new => resolved
2019-05-21 13:40 sbrun Resolution open => fixed
2019-05-21 13:40 sbrun Note Added: 0010598