Skip to content

Conversation

@rc042
Copy link

@rc042 rc042 commented Jan 25, 2024

Update nmapAutomator.sh to be compatible with MacOS Sonoma 14.2.1 (tmp file issue)

The modification could solve #68

@rc042
Copy link
Author

rc042 commented Jan 25, 2024

The changes were:

nmapProgressBar() {
        refreshRate="${2:-1}"
        outputFile="$(echo $1 | gsed -e 's/.*-oN \(.*\).nmap.*/\1/').nmap"
        # tmpOutputFile="${outputFile}.tmp"                           # Commented
        baseDir=$(dirname "${outputFile}")                            # NEW
        baseName=$(basename "${outputFile}" .nmap)                    # NEW
        tmpOutputFile="${baseDir}/${baseName}.tmp"                    # NEW

And I use gsed instead sed on MacOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant