Giter VIP home page Giter VIP logo

o365-uc's Introduction

O365-UC

Office 365 Account Registration Portal

requirement

sudo apt install tmux python3 python3-pip
sudo pip3 install tornado

Installation

git clone https://github.com/HuJK/O365-UC.git
cd O365-UC/backend/
# Running in the backgroung
tmux new -d -s o365 python3 o365-creater_api.py
# Running in the foreground
python3 o365-creater_api.py

Usage

Then connect to https://127.0.0.1:12536

Create accounts by invite code:

alt text alt text alt text

Configure invite code:

In the invite_code folder, each filename is a code and the content is the usage count.

Make sure these files only contain numbers. No any newline , or any characters other than [0-9]

alt text

Or you can write your own invite code check algorithm. Just edit line 86 to line 103 at the backend/o365_creater_auth.py file:

If you change this:

    def check(self,password):
        i_path = os.path.join(self.invite_code_path,password)
        if os.path.isfile(i_path):
            with open(i_path) as i_fileHendler:
                use_left = int(i_fileHendler.read())
            if use_left < 0:
                return True
            elif use_left == 0:
                os.remove(i_path)
                return False
            elif use_left == 1:
                os.remove(i_path)
                return True
            else:
                with open(i_path,"w") as i_fileHendler:
                    i_fileHendler.write(str(use_left - 1))
                return True
        return False

to this:

   def check(self,password):
       import math
       return 0== sum([ True if int(password)%factor == 0 else False for factor in ( [2] + list(range(3,int(math.sqrt(int(password))),2) )) ]) and int(password) > 1000000000

, any prime number which > 1000000000 wil be considered to a valid invite code.

Setup:

Default password: admin

alt text alt text alt text alt text alt text alt text alt text alt text alt text alt text

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.