Jump to content
Sign in to follow this  
ddoberloh

Pulling an IP out of a file

Recommended Posts

So i have a file that contains all kinds of information about a network adapter formattes something like this

[stuff1]

this is some stuff

this is stuff too = 12345

this is more

[stuff2]

this is some stuff

this is more = <WHAT I NEED>

more more etc...

...

...

end of file

how would i go about extracting this to a variable in auto it?

Share this post


Link to post
Share on other sites

You're probably dealing with what they call an ini file. There are script functions to get information from those.

try looking into IniRead("SomeStuff","default data")

Share this post


Link to post
Share on other sites

[gateway]

activationkey = 0006306948189422573245

type = standalone

[loader]

application_1 = Gateway.exe

application_2 = Client.exe

application_3 = discovery-server.exe

application_4 = discovery-responder.exe

[sslconf]

clientkeypath = mycert

[attributes]

customerid = 112

networkpassword = 3497398556403941

gwid = 630

gwuser = Gateway@company.com

gwpassword = wxn4tx2bx7jrjn

[TunnelServer]

primarysubnet = 2001:5470:214b:0120::

ptunaddress = 2001:0470:818b:0501::0120:0002

secondarysubnet = 2001:0470:8135:0121::

ptunsubnet = 2071:9470:813b:0001::0120

ptunsubnetmask = 112

primarysubnetmask = 64

secondarysubnetmask = 64

tunnelservertcpport = 50494

tunnelserveripv4address = 143.155.782.209

slash48address = 2001:0470:813b:

cint = Wireless Network Connection

This is what my file looks like. What i need is in red. The file is a special file called a .gateway file but it opens normally as a text file.

Share this post


Link to post
Share on other sites

ZOMG FREE PASSWORDS!

All your bases are belong to GUESTS

Edited by mechaflash213

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...