Add shortcut mod to profiles#85
Conversation
obilodeau
left a comment
There was a problem hiding this comment.
Good feature! Please see my comments for small improvements.
malboxes/malboxes.py
Outdated
|
|
||
| def shortcut_function(fd): | ||
| """ Add shortcut function to the profile """ | ||
| fd.write("""function Add-Shortcut{ |
There was a problem hiding this comment.
I think we should extract that code in an external .ps1 file that we can inline at runtime. Add it in here: malboxes/scripts/windows/
Then you can replace shortcut_function(fd) with an open(...).read()
malboxes/profile-example.js
Outdated
| "shortcut": [ | ||
| //Create shortcuts for exe files | ||
| {"dest": "$env:USERPROFILE\\Desktop\\Fiddler.lnk", "target": "$env:LOCALAPPDATA\\Programs\\Fiddler\\Fiddler.exe"}, | ||
| {"dest": "$env:USERPROFILE\\Desktop\\Fiddler Port 9999.lnk", "target": "$env:LOCALAPPDATA\\Programs\\Fiddler\\Fiddler.exe", "arguments": "/port:9999"}, |
There was a problem hiding this comment.
One of these exemples should be a desktop shortcut with the shorter syntax since you explicitly support it.
|
I think a |
|
Thanks @snakems! @pix, I think in this case this is clearly a function and we can include it and call it instead of generating a ton of code through jinja templates. That said, I'm looking forward to see what you come up with regarding building Linux boxes and we'll see what kind of generalization we can do there. |
No description provided.