Python Protocol Simulator Code
multiple protocol simulator written in python
Status: Beta
Brought to you by:
ssrepfler
File | Date | Author | Commit |
---|---|---|---|
doc | 2021-04-14 | sergej | [c09aa7] documentation update |
py2 | 2021-11-07 | sergej | [e8b1c2] ARM (orange pi) eapcalc |
py3 | 2021-12-11 | sergej | [1b1011] Release |
src_hostapd | 2020-04-08 | sergej | [7b2aff] fixing ceap build |
.hgignore | 2012-11-20 | sergej | [6909e0] Final changes to 3.1 - RELEASE |
README.txt | 2021-04-14 | sergej | [c09aa7] documentation update |
Python Protocol Simulator ----------------------------- Copyright (c) 2012-2021, Sergej Srepfler <sergej.srepfler@gmail.com> EAP calculations use parts of hostapd code (http://w1.fi/hostapd) Copyright (c) 2004-2008, Jouni Malinen and contributors. All rights reserved. EAP-SIM calculations use a3a8 code (http://http://www.scard.org/gsm) Copyright 1998, Marc Briceno, Ian Goldberg, and David Wagner. All rights reserved. This program is licensed under the BSD license. Intro ----- If you are like me, you just hate that "itch". Something that is bothering you, and the best solution is to scratch it. Well - this is my scratch. There is no portable diameter client. At least I don't know about it. I have been toying with the idea to write one for a long time, but... the amount of work seemed high, and there never was enough "need" for me to do it - until now. Luckily for me, I stumbled upon the Python Diameter Library. Unfortunately, I could not use it on my project, so I just used some ideas and here is the result. Also I "borrowed" from hostapd server all the EAP calculations I needed (since I could not find python implementation - and even when I did (milenage and hmac1) - it did not work on target platform without additional installations). The goal was to have: - a PORTABLE diameter client (that means no installation required, just unpack and run, without changing existing applications on system) - primary usage is TESTING, not heavy load or simplest usage - must work on Solaris, Linux and Windows - dictionary is mandatory (to easily test mismatched AVP or modify values) - unknown AVPs need to be easily manageable (inserted without defining in dictionary) - the client should be able to perform necessary EAP (AKA and AKA') calculations - must be able to send deliberately malformed packet And it worked like a charm. So I got carried away and added support for radius. And DHCP. And LDAP. And SNMP is planned :-) Now on more serious note: - DHCP client was done simply as a proof that python can easily send RAW packets. But it is not tested enough, especially in multi-homed environment (more than one network card). - Similar goes for LDAP library. I tried a new approach, but - yuck: I don't like it. It will most definitely be rewritten (as soon as I figure out more about schema and other stuff. And have more time). Then I left the code running in the wild. And the time passed. python2 became unsupported. So now it is time to have python3 support. Instead of just changing the code to support both python versions, I choose to re-implement the library (as every "smart" programmer do). So now we have this. Mostly uncompatible old and new version. Logic is the same, usage is similar, but not identical (and I do not see how it can be, since python2 used string as bytearray). see doc folder for more detailed info