Coder Social home page Coder Social logo

bms-token's Introduction

BMS-Token

GitHub license GitHub last commit Code style: black

BMS/Secure-IT Token OATHController.

Description

OATHController

src/OATHController.cs extracted from uk.co.bmsnotts.mobilesecureit.apk, which uses the Xamarin platform, with an added command-line interface.

dnSpy and ILSpy were used to decompile uk.co.bmsnotts.mobilesecureit.apk/assemblies/MobileSecureIT.dll.

The passcode used to verify the secret is the 5th, 10th, 15th, 20th, 25th and 30th characters of the secret (zero-indexed).

The method for generating HOTP tokens can be found in OATHController.GenerateHOTPPassword.

Database Interface

A Python interface to the Secure-IT Token SQLite3 database can be found in bms_token.db.

The database can be found in the following location on Android:

/data/data/uk.co.bmsnotts.mobilesecureit/files/LocalDB.db3

Python

A graphical interface can be found in bms_token.gui and run using:

  • python -m bms_token.gui

A command-line interface is also provided:

  • python -m bms_token.cli

C#

To use the C# command-line interface, compile the modified source.

Compile

Compile src/OATHController.cs with Mono:

  • mcs OATHController.cs

Usage

mono OATHController.exe <gen|verify> <secret> <iteration|passcode>

  • gen: generate token for secret at index iteration (negative for range)

  • verify: verify passcode for the specified secret

Python Wrapper

A Python wrapper (requires pythonnet) for the C# classes is found in bms_token.controller.wrapper.

Compile src/OATHController.cs with Mono as a library:

  • mcs -t:library OATHController.cs

Then copy the built DLL to bms_token/controller/wrapper/bin/.

Licence

The Python package bms_token is licensed by the GPL-3.0.

All source code in src is derived from libraries found in uk.co.bmsnotts.mobilesecureit.apk, with an added BMSToken class to provide a command-line interface.

Credits

Secure-IT Token = https://play.google.com/store/apps/details?id=uk.co.bmsnotts.mobilesecureit

dnSpy = https://github.com/dnSpy/dnSpy

ILSpy = https://github.com/icsharpcode/ILSpy

bms-token's People

Contributors

zedeldi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.