Plotting Senderbase Information on a World Map

Greetings,
I have whipped up a quick script some of you may find useful.
ip2mapplot.py is a Python script for resolving a number of IP addresses to latitude / longitude coordinates and plotting them on a world map
Below is an image generated from one days worth of Senderbase drops on our Ironport MGAs:
[img:f531ef1b7c]http://insecure.io/images/a/a6/Map_sbrs_small.jpg[/img:f531ef1b7c]
Source code is available here: http://research.mince.ac.nz/ip2mapplot.py
Further instructions here: http://insecure.io/index.php/Code/ip2mapplot
Cheers,
si

Here's what our map looks like with one week's worth of data on hosts with a SBRS of -10 to -4.
[img:c91b0e4b2a]http://web.acd.ccac.edu/~bpoyner/ironport/ironport-map-small.jpg[/img:c91b0e4b2a]
[+] Found 691344 unique IP addresses
[+] Determining unique latitude / longitude points
[+] Plotting 15037 discrete points on map
[-] Plotting 14098 points for x < 100
[-] Plotting 772 points for 100 < x < 500
[-] Plotting 131 points for 500 < x <2500> 2500
I don't know if anybody else ran into this issue, but as-is the script provided by si doesn't work with python 2.3. You'll get the following error message:
[+] Determining unique latitude / longitude points
Traceback (most recent call last):
File "./ip2mapplot.py", line 41, in ?
latlon = count.partition(',')
AttributeError: 'str' object has no attribute 'partition'
You have to change partition to split, and change the latlon array reference accordingly.

Similar Messages

  • [CS4/JS] Where Am I!? A World Map script

    Here's one I originally wrote for InDesign, but Illustrators may like it as well!
    This is a Javascript implementation of a program I had on the hard disc of several consecutive computers, going back to the late '80s. This version was an implementation in C, which in turn was based upon a Pascal program: CARTOG.PAS, accompanying "Mapping the World in Pascal" by Robert Miller and Francis Reddy, BYTE, December 1987, page 329
    What does it do? It draws a world map. That's all
    Written for CS4 (but it might work other versions). Simply run the script and enter stuff into the dialog -- it ought to do the rest automatically. If you want to see your own location from outer space, go to LATITUDE et LONGITUDE de quelques Villes (which was the first comprehensive listing I found; there are lots of others) and see if your hamlet is listed. You can enter coordinates either as positive/negative values, or follow them with "E" or "W" and "N" or "S". Only decimal notation is supported; minutes & seconds was too much work.
    The image is grouped into one and consists of the background circle, all land masses in a group of their own, and optionally the meridians, also grouped. If you ungroup once, you can color and move the land and meridians around. Ungroup again to get ten zillion tiny objects, so you can play Tectonics 1-0-1 and shift the continents around the globe.
    Note: the calculations for the larger continents, in particular Asia, sometimes clash with my math. If so, you'll see stray lines and a messed up image ... No cure for that, except trying with slightly different coordinates.
    Download Instructions:
    Download from my website: http://www.jongware.com/binaries/whereami.zip
    The package contains the script, which you can move into your Illustrator Scripts folder to be able to run it from File -> Scripts, and three icons; these you should put in your own Documents folder. Sorry about that -- it seems there is no good way to make sure the script can find the images otherwise! If you forgot that or just don't want to mess up your documents, it'll still work, but with a nagging message "Wot no img!?".

    After you got a nice view of the world, you can ungroup, scale, move, and size all elements at will. It may be necessary to use the Pathfinder to combine all loose islets and stuff into one solid object -- otherwise, you might see the dividing line between Europe and Asia. It also gets easier to fill stuff.
    This image, inspired on a classic, took me a couple o'minutes of tinkering ... And of course the world is centered on the place where I live

  • Is there an App for the iPad that will show my GPS position on a world map, even if I'm at sea?

    Is there and App for the iPad that will show mu GPS position on a world map, even if I'm at sea?
    Thanks,
    Tomac

    BobTheFisherman wrote:
    GPS will show your position anywhere if your device has unobstructed view of the GPS satellites. The issue is that you must find a maps/charts that include all areas of the sea.
    There is no mobile data connection required to use GPS on land or sea. Once again your issue is the availability of downloadable maps/charts for the areas you will be traveling.
    Sorry, but you can't install an app like NAVIGON on an iPad without 3G cellular data connection:
    copied from NAVIGON app:
    ...can be installed on any iPhone3GS, iPhone4, iPhone4S, iPhone5 or iPad device (the navigation function is only available on the iPad WiFi+3G)
    Can I navigate with my mobile phone?
    Answer:In principle yes. For mobile phones there are both Onboardnavigation solutions and Offboardnavigation solutions.
    The following requirements must be fulfilled:
    •     The software must support the mobile phone. NAVIGON software
          always comes with a compatibility list. The software is guaranteed
          to work only for the mobile phones on this list.
    •     The mobile phone must have a GPS receiver. Many new mobile
           phones come with a built-in GPS receiver. Otherwise you can use
           an external GPS receiver which is connected to the mobile phone
           by cable or Bluetooth.
    •     It should be noted that an offboard solution incurs costs for using
          the mobile phone network to communicate with the provider's server.
    Message was edited by: Ingo2711

  • I want to show world map in regions using mapbuilder

    Hi,
    I have uploaded obiee_navteq dump in our database.could you please let me know to spilt in world map in different regions like Europe,Africa,Middle East,Australia,Nroth America....In one map.
    Thanks
    VB

    Do you really need to post three messages with identical topic?
    You have an edit button, you know? That's the icon with a pencil, next to the envelope icon, on the top-right corner of your message (only for the last message of a thread).
    You also have a CODE button above your edit area, it will make code you post much more readable, as asterisks and plus signs are interpreted by the forum...
    i don't know about the differrence between javafx 1.1 and javafx 1.2See [JavaFX 1.2: Features and Enhancements|http://javafx.com/docs/articles/javafx1-2.jsp] for a good start.
    (Funny, I just noticed they write "Java FX" (with a space) in all the titles of the site. Bad for consistency...)

  • Possible to add Multiple Destinations on WORLD MAP?

    Can I add multiple destinations in 1 world map in imovie? Or only the Start and End location? Thanks

    You cannot have multiple destinations in a single map, but you can go from point A to point B to point C to point D, etc. You do this by putting several maps adjacent to each other. So the first map is A to B. The second is B to C. The third is C to D, etc.

  • How to highlight result set data on world map

    Hi,
    I want to show the graphical representation of world map to highlight the countries which having the maximum booking of hotels of our client xyz.
    All the values are coming from the mysql db .
    I want the library which will draw the world map on the Jpanel for the respective result set
    Plz help me for this .
    I generally use the JFreeChart for drawing the other graphs but the Jfreechart don't have the library for the World Map or Destination Graph etc.
    Hint: ( Google Analytic's map is the best example )
    Thanks In Advanced
    Mahesh

    This isn't what you want, but it will get you on the right track. I chose the most complex image I could find so give it a few seconds to read the image and build the paths. The parser is catered to the image I chose, but in general you can probably expect the "path" element to delineate the boundaries for any map svg. The particular image I chose grouped the paths with country ID so I added a little mouse interaction to the GUI. Forgive me for any dumbly coded stuff. I didn't put much effort into streamlining it.
    import org.xml.sax.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.helpers.DefaultHandler;
    import java.awt.geom.Path2D;
    import java.util.StringTokenizer;
    import java.net.URL;
    public class WorldMapTest {
        public static void main(String[] args) throws Exception {
            SAXParserFactory factory = SAXParserFactory.newInstance();
            SAXParser saxParser = factory.newSAXParser();
            SimpletonPathExtractor handler = new SimpletonPathExtractor();
            saxParser.parse(new URL("http://upload.wikimedia.org/wikipedia/commons/b/b7/World98.svg").openStream(), handler);
            createAndShowGUI(handler.locations);
        public static void createAndShowGUI(final java.util.List<Location> locations) {
            JFrame frame = new JFrame();
            JPanel p = new JPanel() {
                @Override
                public Color getBackground() {
                    return Color.white;
                public void paintComponent(java.awt.Graphics g) {
                    super.paintComponent(g);
                    Graphics2D g2 = (Graphics2D) g;
                    g2.scale(getWidth() / 8000.0, getHeight() / 3859.0);
                    g2.setColor(Color.black);
                    Point p = getMousePosition();
                    if(p != null) {
                        p.x = (int) (p.x * 8000/getWidth());
                        p.y = (int) (p.y * 3859/getHeight());
                    String placeID = null;
                    for (Location loc : locations) {
                        if(p != null && placeID == null && loc.boundry.contains(p)){
                            g2.setColor(Color.LIGHT_GRAY);
                            g2.fill(loc.boundry);
                            placeID = loc.id == null?"Unkown":loc.id;
                            g2.setColor(Color.black);
                        g2.draw(loc.boundry);
                    if (placeID != null) {
                        g2.setColor(Color.green.darker());
                        Font f = g2.getFont();
                        f = f.deriveFont(Font.BOLD,(f.getSize() * 8000f / getWidth()));
                        g2.setFont(f);
                        g2.drawString(placeID, p.x, p.y);
                public java.awt.Dimension getPreferredSize() {
                    return new Dimension(1000,482);
            p.addMouseMotionListener(new java.awt.event.MouseAdapter() {
                @Override
                public void mouseMoved(java.awt.event.MouseEvent e) {
                    ((JComponent) e.getSource()).repaint();
            frame.setContentPane(new JScrollPane(p));
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
        public static class SimpletonPathExtractor extends DefaultHandler {
            java.util.List<Location> locations = new java.util.ArrayList<>();
            String recentID;
            @Override
            public void startElement(String uri, String localName, String qName, Attributes attr) throws SAXException {
                if("g".equals(qName)) {
                    recentID = attr.getValue("id");
                if ("path".equals(qName)) {
                    int length = attr.getLength();
                    for (int i = 0; i < length; i++) {
                        String attrN = attr.getQName(i);
                        String val = attr.getValue(attrN);
                        if ("d".equals(attrN)) { //path data
                            Path2D path = new Path2D.Double();
                            //assume simple polygonal path
                            StringTokenizer tk = new StringTokenizer(val, "MLzZ ");
                            try {
                                path.moveTo(Double.parseDouble(tk.nextToken()),
                                            Double.parseDouble(tk.nextToken()));
                                while (tk.hasMoreTokens()) {
                                    path.lineTo(Double.parseDouble(tk.nextToken()),
                                                Double.parseDouble(tk.nextToken()));
                                path.closePath();
                            } catch (Exception e) {
                                throw new Error("I'm a simple parser. I can only do "
                                        + "'LineTo' paths!", e);
                            locations.add(new Location(path,recentID));;
            public void endElement(String uri, String localName, String qName) throws SAXException {
                if("g".equals(qName)) {
                    recentID = null;
        public static class Location {
            Path2D boundry;
            String id;
            public Location(Path2D boundry, String id) {
                this.boundry = boundry; this.id = id;
    }

  • World Map used in the 2012 WWDC  Keynote?

    Hello.  I'm trying to find the World Map graphic used by Tim Cook in the 2012 WWDC Keynote.  Visible about 5:46 into the keynote video here (http://www.youtube.com/watch?v=bkRUE7S8pQI).
    Specifically, he animates or uses 'magic move' to highlight certain countries he is talking about.  Does anyone know where I can find a world map that would do this in Keynote?
    Thanks in advance.

    iMovie includes some fairly high resolution world maps.
    Go to Applications > iMovie > (Right Click) Show Package Contents > Contents > Resources > Map-*.jpg
    Hold Option (alt) as you drag-and-drop the files you want to use, so it will move a copy.

  • Why don't they have a world map in photos anymore

    Why do they change a good photo location system ie take away the world map. It was so easy to look up photos before. Not at all happy with the latest upgrade!

    Send your feedback to Apple at http://www.apple.com/feedback/iphone.html

  • World Map of Oracle XE Users?

    What about starting a world map of Oracle XE users at http://www.frappr.com ?
    There is already one on HTML DB : http://www.frappr.com/htmldbusers and JDeveloper: http://www.frappr.com/jdeveloperusers.
    See the ongoing thread in the HTML DB forum regarding this issue: World Map of HTML DB Users?
    I guess it will make it easier to connect with people in the same area who share the same interest in XE.
    Greetinx from Germany,
    ~Dietmar.

    OK - we have a Frappr-group now!!!
    http://www.frappr.com/oraclexe
    It's easy to use, you can even add yourself to the map without registering!
    So don't hesitate to add yourself to the map!
    I've taken the OracleXE logo from Technet. If this is not appropriate, please let me know, I'll remove it then.
    Also, I've added the following tags: oracle xe database web htmldb xml sql
    We're pretty easy to find through frappr.
    Any comments / changes are welcome.
    ~Dietmar.

  • Since I have downloaded FF 29, it continually comes up with a world map and wants me to answer some survey.

    When I log into FF29 the home web page gives me a world map which then requires me to answer a survey which I have done once but it keeps repeating. I have had to go to Google Chrome because of the nuisance and wasted time.
    Also FF29 does not seem to recognize PDF forms for printing when they are attachments to emails that I want to print out.

    Gingerbread Man,
    "snippets" are below the Search Bar, like
    <pre><nowiki>What kind of Web do you want? Join Firefox users around the world shaping its future.</nowiki></pre>
    That "map" replaces the Firefox "brandLogo" currently. IIRC, that is either new or something that hasn't been messed with before. I'm not sure though, in most Profiles I use a different Homepage.

  • Re: How to store the Information in arrays or Map?

    Hello Everyone,
    I'm reading a calling information from a file
    Calling number, Called to, Time Started, Time Ended
    050, 060 , 1255, 1350
    050, 080, 1050, 1100
    050, 060, 1110, 1130
    080, 090, 0530, 0610
    What is the best way to read this information and store it in arrays so that if I want to find out 050 called what numbers and at what times ?? How can I do that ?

    Create a class called Call or CallData or something that has fields for those quantities. Store instances of that class in a Map where the key is the calling number and the value is the object.
    http://java.sun.com/docs/books/tutorial/collections/

  • My country lacks of information about businesses and streets, to mention some.  I want to provide my time for free to help populate this information and make Apple Maps useful in Costa Rica.

    I love using Siri and your maps.  But in Costa Rica, your maps lack of businesses data, and Siri is unable to provide any information about them, since this information is missing.  I want to offer my time and work for free to help to populate this information in Costa Rica, starting by capital city San José.  Google is much more advanced in the subjet, and I don´t see fair how complete this information is for United States and not the rest of the customers (not to make critic, just pinpointing a fact). 
    Who do I contact in order to make this offer?
    Thank you so much in advance.
    Frank

    Please be aware that you are not communicating with Apple when you post in these forums. These are user-to-user support forums, so in almost all cases the only people who will reply to your posts are, like me, your fellow users.
    As to volunteering to help, you can report issues via the Report A Problem under the main menu in Maps:
    Apple does not otherwise recruit users to assist with data correction, in part because they get the data from other companies. It's possible that there is no such compendium source of data for Costa Rica, at least one that Apple has yet been able to strike an agreement with.
    Regards.

  • Extracting more information from XI XSLT mapping failure

    Hello
    I am getting to grips with XI. When developing XSLT mappings I first run them on Stylus or XMLSpy, ensure they work, and then deploy them to XI.
    Unfortunately they sometimes fail to work in XI, and the amount of information retrieved about the failure is very small.
    I thought of a method to get more infomation in situations like this. I could write a Java method that sends messages to the XI console. This would involve seeing the javadoc API for GlobalContainer, Container and AbstractTrace. I would also need to have these objects in my classpath in order to compile the method. Then I could use the method in the XSL.
    There are two small drawbacks to this plan: I cannot find the Javadoc or the Jar file holding the classes.
    Perhaps one of you readers could either tell me where these things are, or suggest a better method of solving problems like this.
    In either case I look forward to receiving a reply.
    Thanks
    Bill Logan

    Thanks for the suggestion,
    completely forgot about the simpler <xsl:message/> command. I tried this, and it worked fine in Stylus.....but not in XI.
    I think the problem s when the file is being loaded. An alert box pops up. It says
    "Transformer configuration exception occurred when loading XSLT GDS_to_DP.xsl (http://sap.com/xi/GDSConsole, 155fc320-f69f-11d8-97f7-c0140a114c15, -1)"
    and the trace window says this
    "10:00:13 Start of test
    Creating XSLT mapping GDS_to_DP
    URIResolver called with href = GDS_DP_Common.xsl and base = GDS_to_DP.xsl
    Source resolved. System id = GDS_DP_Common.xsl
    10:00:14 End of test"
    It seems obvious (from deduction) that the problem lies in GDS_DP_Common.xsl. XI will not give me any information precisely where this occurs
    Thanks for you earlier answer Alessandro

  • View pinpoint-information of a Google Map in a UIWebView

    Hello,
    I'm building an application with a webview of a Google Map with loads of pinpoints. Those pinpoints are already placed on the map, and the map is succesfully embeded in my website.
    When I click on a pinpoint in my Safari 'for Mac', I see the information of the pinpoint. When opening my application on my iPhone and start clicking on pinpoints... nothing happens.
    Is there a solution for this problem?
    (Running firmware 3.1.2)
    Gr.
    Vincent

    I did another test and something seems to have changed since I had trouble with my app. If I place a href for [this URL|http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=1093915278307402071 25.0004463abd2c899f08839&z=14] into a WebView and tap the link to load it the pins work in the WebView!
    See if your page works with fewer points.
    Message was edited by: xnav

  • Information on  CRM Value Mapping

    hello.......
    I need to give presentation on CRM Value Mapping.
    I would be very thankfull, if any one tell me
    what is CRM Value mapping?
    Whats the use of it?
    If you have any material on CRM Value mapping...
    Best Regards
    RAJ

    Value Mapping function
    Executes a value mapping for the value I entered. In the function attributes, assign the both input value I and source value O to a representation in the value-mapping table. In this way, you can assign source and target structure fields to a representation. You complete the value-mapping table on the configuration maintenance screen in the Integration Builder. Since these entries are not available at design time, the mapping result is just an estimate when you test the message mapping.
    for more information click here
    http://help.sap.com/saphelp_crm60/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/content.htm
    Reward points if helpful
    cheers
    Manohar

Maybe you are looking for