Result of nmap depends of mac address


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Result of nmap depends of mac address
# 1  
Old 07-24-2017
Result of nmap depends of mac address

Hi guys, i am having some mine bash script which print only ip addresses

Code:
echo "Interfaces IP addresses:"
ip -o addr | awk '!/^[0-9]*: ?lo|link\/ether/ {print $2" "$4}'
echo -n "enter range of IPs(192.168.0.1-254)[ENTER]: "
read range
nmap -oG - $range >/home/test/Desktop/SCAN
cat /home/test/Desktop/SCAN |grep Up | awk -F " " '{print $2}' > /home/test/Desktop/SCAN2
echo "IPs in range $range:"
cat /home/test/Desktop/SCAN2

I know want to give a little more. I have some devices with same mac addresses, and if all my pc in networks begin with ff:aa mac, how can i add some maybe question: Do you want scan all devices or PCs, and if user press 2, it will nmap only devices with mac address that starts with ff:aa

Last edited by rbatte1; 07-24-2017 at 11:22 AM.. Reason: Split :D in text to avoid the big grin icon replacing it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

MAC Address - Four Interfaces with the same MAC Address

four interfaces with ifconfig all interfaces have the same mac. If is not set for unique. but it still works. what difference does it make to have all macs the same or different? (4 Replies)
Discussion started by: rrodgers
4 Replies

2. IP Networking

Tracing a MAC address to IP address: Solaris

Hi there I lost connectivity to one of our remote systems and when I checked the messages log I found the following: Aug 10 23:42:34 host xntpd: time reset (step) 1.681729 s Aug 16 13:20:51 host ip: WARNING: node "mac address" is using our IP address x.x.x.x on aggr1 Aug 16 13:20:51 host... (9 Replies)
Discussion started by: notreallyhere
9 Replies

3. SCO

MAC address

hi every one please help i want to change mac address in sco unix 5.0.6 how can i do this (3 Replies)
Discussion started by: kaydream
3 Replies

4. Cybersecurity

MAC Address spoofing

There is a question in the SCO section asking for information on how to change the MAC address of a NIC. Is there a valid reason for wanting to change the MAC address? (1 Reply)
Discussion started by: jgt
1 Replies

5. Solaris

Get ip address from mac address

I have following message in my messages file on solaris 10 WARNING: e1000g3712000:3 has duplicate address 010.022.196.011 (in use by 00:50:56:85:25:ef); disabled Now is there any way i can find which server has 00:50:56:85:25:ef mac address either IP or Hostname ? (6 Replies)
Discussion started by: fugitive
6 Replies

6. Programming

SCO get MAC Address

Does anyone know how to get the mac address of a SCO box using c. (11 Replies)
Discussion started by: jcarter2333
11 Replies

7. Solaris

Host ID vs MAC Address

Hi, I've got a Sun Solaris machine with host ID (840f8e57) and MAC address (0:14:4f:f:8e:57), how do I: 1. Write the MAC address in standard (IEEE 802) format, i.e. xx-xx-xx-xx-xx-xx? Do I need to add 0's before or after the 'f', i.e. 00-14-4f-0f-8e-57 or 00-14-4f-f0-8e-57? 2. What is... (4 Replies)
Discussion started by: TheBlueSky
4 Replies

8. IP Networking

How to Achive IP address through MAC(Ethernet) address

Hi sir, i want to make such programe which takes MAC(Ethernet) address of any host & give me its IP address....... but i'm nt getting that how i can pass the MAC address to Frame........ Please give me an idea for making such program... Thanks & regards Krishna (3 Replies)
Discussion started by: krishnacins
3 Replies

9. UNIX for Dummies Questions & Answers

Mac address

Hi Can some one help me How do find out Mac address in Tru64 Unix Thank you (1 Reply)
Discussion started by: Syed_45
1 Replies

10. Programming

Get Mac Address

:( Hi I am trying to get Mac address of of my Sun server from my C program running on the host machine. Any suggestions . (1 Reply)
Discussion started by: ss_hpov
1 Replies
Login or Register to Ask a Question
escape(1)							Mail Avenger 0.8.3							 escape(1)

NAME
escape - escape shell special characters in a string SYNOPSIS
escape string DESCRIPTION
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result. EXAMPLES
The following is a contrived example showing how one can unintentionally end up executing the contents of a string: $ var='; echo gotcha!' $ eval echo hi $var hi gotcha! $ Using escape, one can avoid executing the contents of $var: $ eval echo hi `escape "$var"` hi ; echo gotcha! $ A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient: #!/bin/sh formail -x to -x cc -x resent-to -x resent-cc | fgrep "$1" > /dev/null && exit 0 echo "<$1>.. address does not accept blind carbon copies" exit 100 To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt script: bodytest reject_bcc `escape "$RECIPIENT"` SEE ALSO
avenger(1), The Mail Avenger home page: <http://www.mailavenger.org/>. BUGS
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells. AUTHOR
David Mazieres Mail Avenger 0.8.3 2012-04-05 escape(1)