Brownian motion

around the essentials…


Archive for the Category ‘Administration’

Using Scapy for… fun :-)

A history.

Some time ago i was looking for a generator of OSPF Hello packets for bombing «test bed». After twidding with packEth (i was catching/forming/checking packets, it was lazy and sleepy, hung occasionally) i left this idea — took two cisco routers and set a primitive OSPF configuration up (not too much packets, but «good ones» and with regular intervals — it was enough for me that time).

A bit later i googled for some thing (other? can’t remember) and have found Scapy.

That’s a very funny instrument :-)

Just take a look at a couple pf papers:

So, two «recipes» (so simple for Scapy). Generation of OSPF Hello packets and Plotting ping response times.

» Read more — code and comments… »

(No Ratings Yet)

Extract part of FreeRadius’ log — Python

I just have wrote about Extract part of FreeRadius” log with a little awk script. Then I decided that it whould be easier and quicker than with Python.

Here is a Python script, which does the same (and written in the same way):

» Read more — code and comments… »

(No Ratings Yet)

Extract part of FreeRadius’ log

Today I needed to extract some records from FreeRadius” log — those with Called- or Calling-Station-Id like XXXYYZ[0-2]. Started to type #!/usr/bin/python in new file, but «suddenly» decided to do it with awk.

If you don’t know — FreeRadius’s log contains «sections» separated by empty lines. Every section contains records Called-Staion-Id = <number> (or Calling-Station-Id), and i need to extract sections regarding calls to/from specific numbers.

So, the five-minutes-working-code:

» Read more — code and comments… »

(No Ratings Yet)

Using SPARK module

I have finally formatted my «old» paper about using Python’s SPARK module for compiling «little languages» and code generation — as example, for scanning, parsing, analyzing a simple configuration file for configuring HTB shaper and generating a code (shell script).

I put it as a staic page — here.

(No Ratings Yet)

Recent Posts