background preloader

Python

Facebook Twitter

Getpython3.com. Pylogsparser : a use case, analysing ssh attacks. Digg In this article we will see how easy it is to use the pylogsparser library through a simple use case.

Pylogsparser : a use case, analysing ssh attacks

It should help you start working on your own project involving log analysis. The problem Here at Wallix we mostly switched to using VPN links when we need to access local resources from the outside world, and all inbound SSH traffic is redirected to a small unused server, completely isolated in our firewall’s DMZ. We could have simply shut down the service, but it is more interesting to keep it up as a kind of “honeypot”, giving us insight on what happens to any machine exposed to the Internet. The solution We will use a few python libraries to tackle our problem : the pylogsparser library, obviously, will be used to parse the SSH logs;the matplotlib library will be used to plot pie charts related to our findings;the GeoIP library will be used to translate incoming IPs into countries of origin;the numpy library will be used once to define a pretty color map for our pie charts.

Analysis. SimPy Home. Jsonstore 1.1.0. CubicWeb Semantic Web Framework. Robotframework-sshlibrary - A test library for Robot Framework that enables SSH and SFTP. Lxml - Processing XML and HTML with Python. Karrigell - A web framework for Python 3.2+ Karrigell is a Pythonic web framework, very simple to learn and to use Karrigell's design is about simplicity for the programmer and integration of all the web environment in the scripts namespace.

karrigell - A web framework for Python 3.2+

All the HTML tags are available as classes in the scripts namespace : def index(): return HTML(BODY("Hello world")) To build an HTML document as a tree, the HTML tags objects support the operators + (add brother) and <= (add child) : def index(): form = FORM(action="insert",method="post") form <= INPUT(name="foo")+BR()+INPUT(name="bar") form <= INPUT(Type="submit",value="Ok") return HTML(BODY(form)) The scripts can be served by a built-in web server, or through the Apache server, either on CGI mode or using the WSGI interface.

Welcome to pytest! Pycassa/pycassa - GitHub. Overview — Sphinx v1.0.8 documentation. Python Extension Packages for Windows - Christoph Gohlke. By Christoph Gohlke, Laboratory for Fluorescence Dynamics, University of California, Irvine.

Python Extension Packages for Windows - Christoph Gohlke

This page provides 32- and 64-bit Windows binaries of many scientific open-source extension packages for the official CPython distribution of the Python programming language. The files are unofficial (meaning: informal, unrecognized, personal, unsupported, no warranty, no liability, provided "as is") and made available for testing and evaluation purposes. If downloads fail reload this page, enable JavaScript, disable download managers, disable proxies, clear cache, and use Firefox. Please only download files manually as needed. Most binaries are built from source code found on PyPI or in the projects public revision control systems.

Refer to the documentation of the individual packages for license restrictions and dependencies. Use pip version 8 or newer to install the downloaded .whl files. Install numpy+mkl before other packages that depend on it. Build Environment. Neo4django 0.1.4. Dcramer/django-sentry - GitHub. Chameleon templates.

It’s designed to generate the document output of a web application, typically HTML markup or XML.

Chameleon templates

The language used is page templates, originally a Zope invention [1], but available here as a standalone library that you can use in any script or application running Python 2.5 and up (including 3.x and pypy). It comes with a set of new features, too. The template engine compiles templates into Python byte-code and is optimized for speed. Cloud Computing. Simplified. Webengineer/django-fabfile - GitHub. Schinckel / django-shell+ Odict 1.4.3. Ordered dictionary.

odict 1.4.3

Dictionary in which the insertion order of items is preserved (using an internal double linked list). In this implementation replacing an existing item keeps it at its original position. Internal representation: values of the dict: [pred_key, val, succ_key] The sequence of elements uses as a double linked list. Super Easy Python JSON Client & Server. Welcome to JCC, PyLucene's code generator. What is JCC ?

Welcome to JCC, PyLucene's code generator

JCC is a C++ code generator that produces a C++ object interface wrapping a Java library via Java's Native Interface (JNI). JCC also generates C++ wrappers that conform to Python's C type system making the instances of Java classes directly available to a Python interpreter. When generating Python wrappers, JCC produces a complete Python extension module via the distutils or setuptools packages. Inflect 0.2. Correctly generate plurals, singular nouns, ordinals, indefinite articles; convert numbers to words inflect.py - Correctly generate plurals, singular nouns, ordinals, indefinite articles; convert numbers to words.

inflect 0.2

This document describes version 0.2.4 of inflect.py pip install -e git+ 0.1. License Copyright (c) 2011, NiteoWeb Ltd.

0.1

All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.Neither the name of NiteoWeb Ltd. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Dotfiles 0.4. Easily manage your dotfiles dotfiles is a tool to make managing your dotfile symlinks in $HOME easy, allowing you to keep all your dotfiles in a single directory.

dotfiles 0.4

Hosting is up to you. You can use a VCS like git, Dropbox, or even rsync to distribute your dotfiles repository across multiple hosts. The repository can be specified at runtime, so you can manage multiple repositories without hassle. See the Configuration section below for further details. Ujson 1.9. Task Coach. Py2neo - (Python)-[:REST]->(Neo4j)

Gedit as a Django IDE for Linux. Configuring gedit as a Django Text Editor in GNOME That's right, gedit, the default text editor in GNOME, is actually a pretty bad ass IDE for Django web development.

Gedit as a Django IDE for Linux

To those who have not really explored gedit it looks much like "Notepad" at first glance. Do not be fooled. gedit is incredibly fast, efficient, and stable. That makes it a great editor. Pair a great text editor with the right plugins and you got yourself a clean, lightweight, simple IDE. Server-core: services/ldappool.py@af86645e1cd7. Camelot - See it. An open source web scraping framework for Python. Easy Facebook Scripting in Python « Heterogenous Mixture. UPDATED: fbconsole Pypi Package and Github Repository Sometimes you just want to write a little script using Facebook’s api that updates your status, or downloads all your photos, or deletes all those empty albums you accidentally created.

In order to streamline my writing of one-off facebook scripts, I created a micro api client that implements the client-side authentication flow and has a few utility functions for accessing the graph api and fql. To use this mini api client, all you have to do is put 4 lines of code at the top of your python script: Now you can specify the permissions you’ll need for your script (from the list of available api permissions) and authenticate yourself: By default, the api client makes requests as the “fbconsole” app.

Once authenticated, you can make whatever calls to the graph api or fql that you want. Post a status update. Parser Combinators Made Simple. April 18, 2011 # Parsing theory has been around for quite a long time, but it is often thought of as magic by the swarms of people who haven't bothered to read about it, and see how plain and dry it actually is. Algorithms for parsing LR(k) grammars (meaning Left-to-right, Right-most derivation, k tokens lookahead) for instance, normally just traverse a state machine that was computed before hand (either by hand, or by using a parser generator such as bison or yacc). Sure, there are many things to trip on, tedious to track down ambiguities, and other issues, but the general theory of parsing has remained unchanged for years—one might say, it is a solved problem.[1] When learning about parsing for the first time though, the idea of a recursive descent parser is often taught first.

Python Module of the Week. Virtualenvwrapper 2.9 — virtualenvwrapper v2.9 documentation. Virtualenvwrapper is a set of extensions to Ian Bicking’s virtualenv tool. The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow, making it easier to work on more than one project at a time without introducing conflicts in their dependencies. Features¶ Ronnix/fabtools - GitHub. Python Imaging Library (PIL) The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities. Status. A crossplatform framework for creating NUI applications. Python-dateutil - Labix. Description The dateutil module provides powerful extensions to the standard datetime module, available in Python 2.3+. News 2011-03-24 dateutil 2.0 is out! Toolkit - ReportLab.com.

The Open Source PDF library. Python Cloud IDE. Virtualenvwrapper 2.8. Presentation: pip and virtualenv. Icalendar 2.2. Braintree Python Docs. Radio free python. Python Twitter Tools (command-line client and IRC bot) Py-postgresql. PythonEggs - The PEAK Developers' Center. Rst2pdf - Tool for transforming reStructuredText to PDF using ReportLab.

Apache Libcloud Python library - Apache Libcloud is a standard Python library that abstracts away differences among multiple cloud provider APIs. Tearing up the Windows Registry with python-registry. Recently, I wanted to dig deep into a forensic artifact resident in the Windows Registry. To make the task more interesting, I challenged myself to use only tools native to my favorite operating system: Linux. I was quickly disappointed, however, as there are few open and cross-platform tools for Windows Registry forensics beyond Perl’s Win32::Registry.

So, I wrote a tool to fill this void using Python – my favorite programming language. Python-registry is the result of this effort, and provides convenient access to Windows Registry files. The Eric Python IDE. Www.pythonxy.com. Starting, Stopping, and Connecting to OpenOffice with Python. Head et tail de liste en Python 3. Bien que Python ne soit pas un langage de programmation fonctionnelle, il incorpore un certain nombre de fonctionnalités typiques de ces langages. Ainsi les fonctions anonymes lambda, la compréhension de liste, ou encore les fonctions built-in map(), filter() et reduce() (cette dernière ayant été supprimée dans Python 3). Stupid Template Languages. Et le meilleur framework web Python est… Django ! Html5lib - Library for working with HTML documents. Python: Introducing ppipe : Parallel Pipe.