mirror of
https://github.com/bettercap/bettercap
synced 2025-08-22 06:23:18 -07:00
Create symlink to handshakes directory
Create symlink to handshakes directory, to add ability to download handshakes directly from the UI
This commit is contained in:
parent
8ccb7c7396
commit
e70bf3394f
1 changed files with 8 additions and 0 deletions
|
@ -223,6 +223,14 @@ func (w *WiFi) SaveHandshakesTo(fileName string, linkType layers.LinkType) error
|
|||
}
|
||||
}
|
||||
|
||||
// Create symlink to handshakes directory - to add ability to download handshakes directly from the ui
|
||||
dirSymlink := "/usr/local/share/bettercap/ui" + dirName
|
||||
if _, err := os.Stat(dirSymlink); err != nil {
|
||||
if err = os.Symlink(dirName, dirSymlink); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
doHead := !fs.Exists(fileName)
|
||||
fp, err := os.OpenFile(fileName, os.O_APPEND|os.O_CREATE|os.O_RDWR, 0666)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue