Skip to content

Commit 40e3b91

Browse files
authored
Add files via upload
1 parent 7dbe0bb commit 40e3b91

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

binpython.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#BINPython By:XINGYUJIE AGPL-V3.0 LECENSE Release
2+
#Please follow the LICENSE
3+
import getopt
4+
import sys
5+
import platform
6+
opts,args = getopt.getopt(sys.argv[1:],'-h-f:-v',['help','file=','version'])
7+
for opt_name,opt_value in opts:
8+
if opt_name in ('-h','--help'):
9+
print("[*] Help info")
10+
print("""
11+
-h --help View this help
12+
-f --file= Enter Python Filename and run
13+
-v --version View BINPython Version
14+
""")
15+
sys.exit()
16+
if opt_name in ('-v','--version'):
17+
print("BINPython By:XINGYUJIE[https://github.com/xingyujie] AGPL-3.0 LICENSE Release")
18+
print("Python " + platform.python_version())
19+
exit()
20+
if opt_name in ('-f','--file'):
21+
file = opt_value
22+
#print("[*] Filename is ",file)
23+
f = open(file,encoding = "utf-8")
24+
exec(f.read())
25+
#codeline=f.read()
26+
#codeline
27+
input("Please enter to continue")
28+
sys.exit()
29+
30+
print("BINPython 0.12 (Python Version:" + platform.python_version() + ")By:XINGYUJIE https://github.com/xingyujie[Running on " + platform.platform() + " " + platform.version() + "]")
31+
print('Type "about", "help", "copyright", "credits" or "license" for more information.')
32+
33+
while True:
34+
x=input('>>> ')
35+
if x in globals().keys():
36+
print(globals()[x])
37+
continue
38+
elif x == 'about':
39+
print("BINPython By:XINGYUJIE[https://github.com/xingyujie] AGPL-3.0 LICENSE Release")
40+
elif x == 'help':
41+
print("Type help() for interactive help, or help(object) for help about object.")
42+
elif x == 'copyright':
43+
print("""
44+
Copyright (c) 2001-2022 Python Software Foundation and BINPython xingyujie(https://github.com/xingyujie).
45+
All Rights Reserved.
46+
47+
Copyright (c) 2000 BeOpen.com.
48+
All Rights Reserved.
49+
50+
Copyright (c) 1995-2001 Corporation for National Research Initiatives.
51+
All Rights Reserved.
52+
53+
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
54+
All Rights Reserved.
55+
""")
56+
elif x == 'credits':
57+
print("""
58+
Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
59+
for supporting Python development. See www.python.org for more information.
60+
""")
61+
elif x == 'license':
62+
print("Type license() to see the full license text")
63+
try:
64+
exec(x)
65+
except Exception as err:
66+
print(err)

0 commit comments

Comments
 (0)