Jump to content

Loop until IP given to victim


Dave-ee Jones

Recommended Posts

Hi guys,

Once again, Dave-ee Jones comin' at you with another question!

How would one loop forever until an IP address (172.16.64.10-12), via DHCP, has been given to the client?
Looking for something like this...

while cannot_see_client {
	sleep 1
}

# Continue with rest of code

 

Link to comment
Share on other sites

2 hours ago, Dave-ee Jones said:

Hi guys,

Once again, Dave-ee Jones comin' at you with another question!

How would one loop forever until an IP address (172.16.64.10-12), via DHCP, has been given to the client?
Looking for something like this...


while cannot_see_client {
	sleep 1
}

# Continue with rest of code

 

while [ $(ping -c 1 -W 1 172.16.64.10 >/dev/null ; echo $?) -ne 0 ]  ; do
     sleep 1
done

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...