Sponsored Content
Homework and Emergencies Homework & Coursework Questions How to scan IP range using nmap? Post 302994001 by drysdalk on Friday 17th of March 2017 09:54:20 AM
Old 03-17-2017
Hi,

Sorry for the delay in replying, I've not been available the last couple of days, but I'll see if I can give you some pointers here. I've taken nmap_scan.txt as the version of your script you intended me to look at, and all line numbers below are based on that file.

The first thing I notice is that you have either mis-spelled or un-defined variables in your script. For example I suspect that you meant to call the variable conunt on line 7 count instead, which you reference in what I surmise must be a debugging loop of some kind in the other attached file, though it does not seem to actually be required for your main script, so this single issue isn't too important.

On a similar note, on line 8 your nmap command is referencing an un-defined variable, line1. Perhaps you meant to use a variable that contained the currently-read IP address here instead ? You have at least one such variable defined elsewhere in your script that you could use.

Also, on line 10 you reference a file called scan.txt which is not referenced anywhere else in your script. If you meant this to be a line that searches through the output of nmap, then this filename should be the same as the one that nmap wrote its output to.

If you make these changes, you should find that your script runs, and populates parse.txt with the kind of output that you expect.

Hope this helps. If you have any further questions let me know and I'll be happy to assist further if I can.
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Nmap

I am pretty new at running nmap ,and i have some doubt about some o/ps the nmap shows I tried to scan my own system for UDP open ports I see that if i use one UDP port say 13 It shows that its in open state , etc But if i scan for the whole UDP ports in the nmap-services . I gives te... (2 Replies)
Discussion started by: DPAI
2 Replies

2. UNIX for Dummies Questions & Answers

nmap results

Hi, Whenever I tried to run nmap on my linux (red hat 6.2) boxes i got these outputs: 4444/tcp filtered krb524 6666/tcp filtered irc-serv 6699/tcp filtered napster 8888/tcp filtered sun-answerbook Can anybody please... (10 Replies)
Discussion started by: necro
10 Replies

3. Shell Programming and Scripting

Nmap PHP FE

Hi everyone! I've temporarily come out of hibernation (and will be gone for about two weeks after this post too) to ask for input on a small PHP script I have just completed. The script aims to be a remote front-end for Nmap - now for the safety of this post, I ask that any replies refrain from... (6 Replies)
Discussion started by: Karma
6 Replies

4. AIX

nmap on aix 5.2

I'm trying to compile nmap 4.11 on an aix 5.2 machine and get the following error when attempting the 'make' command; make "Makefile", line 1: make: 1254-055 Dependency line needs colon or double colon operator. "Makefile", line 14: make: 1254-055 Dependency line needs colon or double colon... (2 Replies)
Discussion started by: zuessh
2 Replies

5. Shell Programming and Scripting

print range between two patterns if it contains a pattern within the range

I want to print between the range two patterns if a particular pattern is present in between the two patterns. I am new to Unix. Any help would be greatly appreciated. e.g. Pattern1 Bombay Calcutta Delhi Pattern2 Pattern1 Patna Madras Gwalior Delhi Pattern2 Pattern1... (2 Replies)
Discussion started by: joyan321
2 Replies

6. Solaris

Nmap error

I 'm getting following error when i run nmap for an ip .. what could be the reason for it ? #nmap 10.22.67.18 Starting Nmap 4.68 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2009-07-06 19:07 UTC Warning: Unable to open interface e1000g3301000 -- skipping it.... (2 Replies)
Discussion started by: fugitive
2 Replies

7. UNIX for Dummies Questions & Answers

nmap scan for survey command

Hello guys, i'm having a problem with nmap, what i'd like to do is a scan to find around 100 or so IP address that are up, and that correspond to sites. The command i need should basically find sites through ip address randomly generated, let's say i generate 2000 ip, i'd like to know how many of... (0 Replies)
Discussion started by: AscaL
0 Replies

8. Cybersecurity

Help with NMAP

I'm seeing a persistent address showing up on my firewall router logs. The address is 10.98.115.9:67, and is broadcasting to 255.255.255.255. I know that this would typically signal a BOOTP service, such as a bootp server announcing itself on the network. But I can't isolate which machine it... (3 Replies)
Discussion started by: renoir611
3 Replies

9. IP Networking

Why Nmap UDP need Root?

I was just wondering, why does Nmap need root when doing an -sU UDP Scan? Please and Thank You. (3 Replies)
Discussion started by: amreason
3 Replies

10. Shell Programming and Scripting

How to scan IP range using nmap?

Scripting language : Bash Shell Script I have to create function in which read IP addresses one by one from one file (ip.txt) and scan these IP using nmap. (4 Replies)
Discussion started by: sk151993
4 Replies
ZENMAP(1)						      Zenmap Reference Guide							 ZENMAP(1)

NAME
zenmap - Graphical Nmap frontend and results viewer SYNOPSIS
zenmap [options] [results file] DESCRIPTION
Zenmap is a multi-platform graphical Nmap frontend and results viewer. Zenmap aims to make Nmap easy for beginners to use while giving experienced Nmap users advanced features. Frequently used scans can be saved as profiles to make them easy to run repeatedly. A command creator allows interactive creation of Nmap command lines. Scan results can be saved and viewed later. Saved scan results can be compared with one another to see how they differ. The results of recent scans are stored in a searchable database. This man page only describes the few Zenmap command-line options and some critical notes. A much more detailed Zenmap User's Guide is available at http://nmap.org/book/zenmap.html. Other documentation and information is available from the Zenmap web page at http://nmap.org/zenmap/. OPTIONS SUMMARY
-f, --file results file Open the given results file for viewing. The results file may be an Nmap XML output file (.xml, as produced by nmap -oX) or a Umit scan results file (.usr). This option may be given more than once. -h, --help Show a help message and exit. -n, --nmap Nmap command line Run the given Nmap command within the Zenmap interface. After -n or --nmap, every remaining command line argument is read as the command line to execute. This means that -n or --nmap must be given last, after any other options. Note that the command line must include the nmap executable name: zenmap -n nmap -sS target. -p, --profile profile Start with the given profile selected. The profile name is just a string: "Regular scan". If combined with -t, begin a scan with the given profile against the specified target. -t, --target target Start with the given target. If combined with -p, begin a scan with the given profile against the specified target. -v, --verbose Increase verbosity (of Zenmap, not Nmap). This option may be given multiple times to get even more verbosity. Any other arguments are taken to be the names of results files to open. ENVIRONMENT VARIABLES
ZENMAP_DEVELOPMENT Set ZENMAP_DEVELOPMENT to disable automatic crash reporting. BUGS
Like their authors, Nmap and Zenmap aren't perfect. But you can help make them better by sending bug reports or even writing patches. If Nmap or Zenmap doesn't behave the way you expect, first upgrade to the latest version available from http://nmap.org. If the problem persists, do some research to determine whether it has already been discovered and addressed. Try Googling the error message or browsing the nmap-dev archives at http://seclists.org/. Read this full manual page as well. If nothing comes of this, mail a bug report to <dev@nmap.org>. Please include everything you have learned about the problem, as well as what version of Zenmap you are running and what operating system version it is running on. Problem reports and Zenmap usage questions sent to dev@nmap.org are far more likely to be answered than those sent to Fyodor directly. Code patches to fix bugs are even better than bug reports. Basic instructions for creating patch files with your changes are available at https://svn.nmap.org/nmap/HACKING. Patches may be sent to nmap-dev (recommended) or to Fyodor directly. HISTORY
Zenmap was originally derived from Umit, an Nmap GUI created during the Google-sponsored Nmap Summer of Code in 2005 and 2006. The primary author of Umit was Adriano Monteiro Marques. When Umit was modified and integrated into Nmap in 2007, it was renamed Zenmap. AUTHORS
Nmap Fyodor <fyodor@nmap.org> (http://insecure.org) Hundreds of people have made valuable contributions to Nmap over the years. These are detailed in the CHANGELOG file which is distributed with Nmap and also available from http://nmap.org/changelog.html. Umit Zenmap is derived from the Umit Nmap frontend, which was started by Adriano Monteiro Marques as an Nmap/Google Summer of Code project (<py.adriano@gmail.com>, http://www.umitproject.org). Zenmap 07/28/2013 ZENMAP(1)
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy