Thursday, February 10, 2011

nslookup and dig in excel for mac

So, I cant program. I can babble perl, understand anything not c++ or ruby, and copy and paste. Oh, yes.

But need is the master of invention, and i had the need of report in an excel spreadsheet the IP address to which some domains and nodes would resolve, or not.

Easy, right?


common sense and time presure is saying to make cell B something like =nslookup(a1)
go scrolling down, and let the resolver do the job.
No such function or macro.

Looking in google show some visual basic crap, that requires windoze OLE objects (winsh, etc), but the, Applescript came to the rescue from some website. Changing the function for a shell objetc (dig +short xxx) made the trick, all the cells were nicely resolved down, in seconds.

Here is the Applescript code snippet:

on run

tell application "Microsoft Excel"

tell sheet "Sheet1" of workbook 1

set EndofRow to 333 -- This defines the last Excel Row with data; it this example, it is A333.

set input_data to ""

repeat with i from 1 to EndofRow -- This loop will run from row 1 until EndofRow set above. For this example, it was set to 333.

set InputCell to the value of (cell i of range ("A1:A" & i)) -- This line defines the range, where in this example it is set A1:A333 and i is the counter and will continue to loop until EndofRow.

set input_data to InputCell

set encoded_data to do shell script "dig +short " & input_data -- This is the resolver

set EncodedCell to ("B" & i) -- This is where to designate where the encoded data is to appear. In this example, the encoded data will be in Column "B".

set value of cell EncodedCell to encoded_data

end repeat

end tell

end tell

end run




And part of the final result (column c is "dig +short www.$domain):


Awesome!

#Leysinde

Under this hashtag, so many passions and dispair.

Spanish politicians (Who? I want all the names, remember January 9th) ignored common sense, civic duties and the people that voted and were claiming for their attention and voted for a law that, in the best case, wont change anything. It will give the actual cinema minister Sinde a nice job in a big company, after stepping out.

So sad, and silly. They will come, the net is where all things end up coming, and they won't be welcomed there.

So far, so good

So i had a blog long time ago, but did nothing with it. Blogs came and went, and today, "social" is the buzzword. Protocols have been superseded by applications owned by companies. Some oldies say they are just enhanced, distributes and graphical version of old Unix comands. I agree, the network os slowly unleashing the power of the Unix personal machine.

And I write this from a Mac, running some Unix flavour, not bsd, not sysv ... who remembers that? Who the hell cares.

Ah! ... last week IANA ran out of ipv4 addresses, gave the last slasheights to the regional registries and celebrated. Jon Postel didn't live to see it, I guess Joyce Reynolds was there. So ipv6, the poster boy of newfangled gurus is slowly coming to us.

So many things changed since the first post!

Looking back, I use tweeter now. Don't have the time to sit down and write. All the scribbled notes in paper never made it to the blog, so, the Blackberry with company paid flatrate connected me more, and allowed me to engage in connected activities while commuting. That's why tweeter makes it ideal, with the small keyboards on the run, to cry and publish those mental sparks.

Blogger got bought. So many did. Aw, anyway. Give it another run, so I can say I have been blogging since 2004, but had my 24 hours running linux box connected since 1995.

Wednesday, July 05, 2006

mapping ip addresses

The best map (cartographic projection) to use to draw IP addreses (or points) onto a map is when the lat.log coordinates map easily with the x,y grid from the map.

Use the NASA "Blue Marble" set, the m82 projection.

Test2

9.3.6 Definitive Software Library

The ‘Definitive software library’ (DSL) is the term used to describe a secure compound in which the definitive authorised versions of all software CIs are stored and protected. This one storage area may in reality consist of one or more software libraries or file-storage areas that should be separate from development, test or live file-store areas. It contains the master copies of all controlled software in an organisation. The DSL should include definitive copies of purchased software (along with licence documents or information), as well as software developed on site. Master copies of controlled documentation for a system will also be stored in the DSL in electronic form.

The exact configuration of the DSL that is required for Release Management should be defined before development commences. The DSL forms part of the Release policy or Change and Configuration management plan for the organisation. The definition should include:

  • medium, physical location, hardware and software to be used, if kept online (a DSL can simply be a secure tape library, if properly controlled and catalogued) – some Configuration Management support tools incorporate software libraries, which can be regarded as a logical part of a DSL
  • naming conventions for filestore areas and physical media
  • environments supported, e.g. test and live environments
  • security arrangements for submitting Changes and issuing software, plus backup and recovery procedures
  • the scope of the DSL: e.g. source code, object code from controlled builds and associated documentation
  • retention period for old Releases of software
  • capacity plans for the DSL and procedures for monitoring growth in size
  • audit procedures

procedures to ensure that the DSL is protected from erroneous or unauthorised Change (e.g. entry and exit criteria for items).

Saturday, March 05, 2005

Patricia will extract info from IPs

Suppose you collect a humongous set of different ip addresses, and they have propoerties such as country, security info, level of trust, login names, urls, etc.

A quick way to build a tree of ip,properties against you can check huge amountsof IPs is by using Patricia algorithm, and the quickest way, for me, is doing it in Perl.

Check out the patricia module (http://search.cpan.org/~plonka/Net-Patricia-1.010/Patricia.pm), and prepare your scripts to build trees.

Once you want to review the porperties of the new bunch of ip addresses, look for matches in the patricia tree strucuture. Fast!!

Site of reference -> Caida.org

One of the sites of reference for Internet Geographers; www.caida.org. I wont describe what is Caida, you need to go and find it yourself. I will only mention that all the projects they do fit in the space of internet geography.

They aim to understand the network and establish a dynamical model of it. TCP dynamics and IP dynamics are frequent words.

Go see the tools section, the projects, papers and conferences. And buy the poster too.

Friday, November 05, 2004

First Post

The first of a million posts!

Can we keep it running? We aim to publish regurlarly the output of our curiosity concerning the new ipmundi, the land at the tipo of your fingertips. the geography of ip networks, pops, servers, websites, distributed apps, proveidres, carriers, DNS servers, domains, etc. And the tools to explore, the vehicles to navigate.