Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create nmapAutomator-macos.sh #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Create nmapAutomator-macos.sh #76

wants to merge 1 commit into from

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