Skip to content

Instantly share code, notes, and snippets.

View sebgoa's full-sized avatar
🏠
Working from home

sebgoa

🏠
Working from home
View GitHub Profile
@sebgoa
sebgoa / crawler.py
Last active October 6, 2023 13:25
A web crawler and graph builder
#!/usr/bin/env python
import subprocess
import urlparse
import urllib2
from urllib import urlencode
import socket
import Queue
import threading
import getopt
@sebgoa
sebgoa / kmltraceroute.py
Last active December 15, 2015 03:39
TCP traceroute using Scapy and plot the resulting KML files of hops
from scapy.all import *
import GeoIP
import xml.dom.minidom
def createkml(urls):
''' This function creates an XML document and adds the necessary
KML elements.
Mostly inspired by http://code.google.com/apis/kml/articles/csvtokml.html
'''
kmlDoc = xml.dom.minidom.Document()
@sebgoa
sebgoa / trace.py
Created March 19, 2013 13:16
Basic port scanning and traceroute to a particular host. Stores information in mongodb.
#!/usr/bin/env python
'''
Copyright (C) 2011 by Sebastien Goasguen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@sebgoa
sebgoa / ec2test.py
Created March 19, 2013 13:28
Basic boto script to talk to CloudStack
#!/usr/bin/env python
import sys
import os
import boto
import boto.ec2
region = boto.ec2.regioninfo.RegionInfo(name="ROOT",endpoint="localhost")
apikey='KEbkKWtYIz_q_fnpOdwnHoZUJt5tiBNiHvf-oApytBd0adU-s-DRP3an1pqL6TutyUCzjRB9UNrBybVr3kcZ6Q'
secretkey='lXaWYrdJfwP6brE2tOxGnOSN8z_Evt7yyCg95jI__ywhmAFcZdhovAQX7-nGeG54thLtFI3HSFVa2dOPKsWcPQ'
@sebgoa
sebgoa / settx.sh
Created March 19, 2013 23:06
Creates the .tx/config file for Apache CloudStack publican based docs.
#!/bin/bash
#Licensed to the Apache Software Foundation (ASF) under one
#or more contributor license agreements. See the NOTICE file
#distributed with this work for additional information
#regarding copyright ownership. The ASF licenses this file
#to you under the Apache License, Version 2.0 (the
#"License"); you may not use this file except in compliance
#with the License. You may obtain a copy of the License at
#http://www.apache.org/licenses/LICENSE-2.0
#Unless required by applicable law or agreed to in writing,
@sebgoa
sebgoa / flasktest.py
Created April 15, 2013 14:37
A flask application that creates a wrapper on CloudStack API. Illustrates the GET calls and query parameters. Dependent on requester.py from https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob;f=tools/cli/cloudmonkey/requester.py
#!/usr/bin/env python
# encoding: utf-8
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
@sebgoa
sebgoa / libshell.py
Created June 26, 2013 19:25
A quickie shell for Apache libcloud
#!/usr/bin/env python
import code
import sys
import os
import urlparse
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security as sec
@sebgoa
sebgoa / cloudstack-dashboard
Created September 11, 2013 19:30
A CloudStack email dashboard Kibana3 configuration file
{
"title": "CloudStack Email Dashboard",
"services": {
"query": {
"idQueue": [
1,
2,
3,
4
],
@sebgoa
sebgoa / cloudplugfest
Last active December 23, 2015 10:19
Instructions for the cloudplugfest Madrid, step by step instructions to discover and get up and running with Apache CloudStack in 2 hours.
CloudStack at CloudPlugFest Madrid
==================================
These instructions aim to give an introduction to Apache CloudStack. Accessing a production cloud based on CloudStack, getting a feel for it, then using DevCloud2 to run CloudStack locally.
0. Getting your feet wet with http://exoscale.ch
1. Installation of the prerequisites
2. Compiling and installation from source
3. Installation with DevCloud the CloudStack sandbox
4. Using the community packaged repo.
@sebgoa
sebgoa / gist:7560629
Created November 20, 2013 09:57
libcloudshell
#!/usr/bin/env python
import code
import sys
import os
import urlparse
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security as sec