Skip to content

Commit 6b4c422

Browse files
committed
fix many bugs and add many func
1 parent dce044e commit 6b4c422

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

binpython.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
####################################
55
#build configure
66

7-
ver = "0.44"
7+
ver = "0.45"
88

99
libs_warning = "1"
1010
#1 is ture 0 is false.
1111
#Changing the value to 0 will close the prompt that the library does not exist
1212

1313

14-
releases_ver = "offical"
14+
releases_ver = "official"
1515
importlibs = "os"
1616
cloudrunver = "1.04"
1717
cmdver = "0.08"
@@ -92,12 +92,17 @@ def optreadfile():
9292
import wget
9393
import shutil
9494
import json
95+
import sqlite3
96+
import openai
9597
#fix for exit()
9698
from sys import exit
9799
#import for http_server
98100
import http.server
99101
import socketserver
100-
import flask
102+
from flask import Flask, render_template, request, redirect, url_for
103+
from flask_login import LoginManager, current_user, login_required, UserMixin, login_user, logout_user
104+
from werkzeug.security import generate_password_hash, check_password_hash
105+
from werkzeug.utils import secure_filename
101106
#except ImportError:
102107
except(Exception, BaseException) as error:
103108
print("Unable to use any library, the program does not work properly, please rebuild")
@@ -417,7 +422,7 @@ def downfs(bpfsurl):
417422
pass
418423
print("[*] Download File System BPFS(BINPython File System)")
419424
wget.download(bpfsurl, runpath + "/binpython_files")
420-
unzip(runpath + "/binpython_files/officialbpfs.bpfs", runpath + "/binpython_files")
425+
unzip(runpath + "/binpython_files/officialbpfsbase.bpfs", runpath + "/binpython_files")
421426
print("\n")
422427
print("[*] Done!")
423428
binpython_cmd()
@@ -428,18 +433,8 @@ def binpython_cmd():
428433
os.chdir(runpath + f"/binpython_files/userdata/")
429434
os.chdir(runpath + f"/binpython_files/cmd")
430435
except:
431-
whichmethod = input("""
432-
Welcome to BINPython CMD! Choose a method to install BINPython CMD:
433-
1. WEB graphical interactive installation (recommended)
434-
2. Interactive text interface (also for non-graphical devices)
435-
Please enter a number (1/2):
436-
""")
437-
if whichmethod == '1':
438-
getwebui = open(get_resource_path('webui.py'))
439-
webui = getwebui.read()
440-
exec(webui)
441-
if whichmethod == '2':
442436
print('''
437+
Welcome to BINPython CMD!
443438
The file system cannot be found or there is an incomplete file system.
444439
type "getfs" to download a file system;
445440
type "getfsurl" to download a filesystem via a custom url;
@@ -459,6 +454,8 @@ def binpython_cmd():
459454
mkbpfs()
460455
if initcmd == 'getfs':
461456
downfs('https://raw.githubusercontent.com/xingyujie/binpython-repository/main/officialbpfsbase.bpfs')
457+
print("Finish! please restart BINPython")
458+
sys.exit()
462459
if initcmd == 'getfsurl':
463460
fsurl = input("Please enter a download link (like: http://url.com/bpfs/bpfsbase.bpfs)")
464461
downfs(fsurl)

0 commit comments

Comments
 (0)