Jump to content

ip range list


Recommended Posts

You mean

109.104.32-63.0-255

should become

109.104.32.0
... 
109.104.32.255 
...
109.104.33.0
...
109.104.33.255 
...
...
109.104.63.255

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Something like this?

Global $sIP = "109.104.32-63.0-255"
Global $aiIP = StringSplit($sIP, ".")
Global $aiIP1 = StringSplit($aiIP[1], "-")
If @error Then
    $iEnd1 = $aiIP1[1]
Else
    $iEnd1 = $aiIP1[2]
EndIf
$iStart1 = $aiIP1[1]
Global $aiIP2 = StringSplit($aiIP[2], "-")
If @error Then
    $iEnd2 = $aiIP2[1]
Else
    $iEnd2 = $aiIP2[2]
EndIf
$iStart2 = $aiIP2[1]
Global $aiIP3 = StringSplit($aiIP[3], "-")
If @error Then
    $iEnd3 = $aiIP3[1]
Else
    $iEnd3 = $aiIP3[2]
EndIf
$iStart3 = $aiIP3[1]
Global $aiIP4 = StringSplit($aiIP[4], "-")
If @error Then
    $iEnd4 = $aiIP4[1]
Else
    $iEnd4 = $aiIP4[2]
EndIf
$iStart4 = $aiIP4[1]
For $iIndex1 = $iStart1 To $iEnd1
    For $iIndex2 = $iStart2 To $iEnd2
        For $iIndex3 = $iStart3 To $iEnd3
            For $iIndex4 = $iStart4 To $iEnd4
                ConsoleWrite($iIndex1 & "." &  $iIndex2 & "." & $iIndex3 & "." & $iIndex4 & @LF)
            Next
        Next
    Next
Next

Results in

109.104.32.0
109.104.32.1
109.104.32.2
...
109.104.32.255
109.104.33.0
...
109.104.33.255
...
109.104.63.255

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I wrote a general purpose >multiping utility/udf that, among other things, it can also generate a list of IP starting from ranges passed in the the shape that you're asking. (but not only)

Here an example:

#include <multiping.au3>
#include <array.au3>

$MyRange = _GetIpAddressList("109.104.32-63.0-255")

_ArrayDisplay($MyRange)

>here you can find Multiping.au3

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

I wrote a general purpose >multiping utility/udf that, among other things, it can also generate a list of IP starting from ranges passed in the the shape that you're asking. (but not only)

Here an example:

#include <multiping.au3>
#include <array.au3>

$MyRange = _GetIpAddressList("109.104.32-63.0-255")

_ArrayDisplay($MyRange)

>here you can find Multiping.au3

 

I just tested the udf and so far it seems to be working brill. Thank you for pointing me to this. And thank you all for helping  :thumbsup:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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