-4
JDOS 또는 Jacob의 DOS라고하는 간단한 DOS 복제본이 있는데 무엇이 빠졌는지 궁금합니다.추가 할 내용
시도중인 경우 admin
이라는 명칭으로 나열되지 않은 명령이 있습니다. 암호는 비어 있으므로 enter를 누르십시오.
저는 파이썬에서 초급 프로그래머입니다. 그렇기 때문에 너무 어렵지는 않습니다. 여기
스크립트입니다 :def jdos1():
print " Boot JDOS.exe?"
answer = raw_input(" [y] or [n]").lower()
if answer == "y" or answer == "[y]":
import time
time.sleep(1)
print " Welcome to JDOS"
time.sleep(1)
print " Type cmds for a list of all avalible commands"
def jdos2():
cmd = raw_input().lower()
if cmd == "exit":
print " Exiting JDOS"
time.sleep(1)
elif cmd == "info":
print "JDOS Script 1.4.0. Created by Jacob Snyder [email protected]"
jdos2()
elif cmd == "ver":
print "JDOS 1.4.0"
jdos2()
elif cmd == "upd":
print ""
jdos2()
elif cmd =="admin":
password = raw_input(" Please enter your admin password.")
def admin():
if password == "".lower():
print " rebooting in admin mode"
time.sleep(1)
print " Welcome to JDOS-Admin"
def admin2():
cmd = raw_input().lower()
if cmd == "exit":
print " Exiting JDOS-Admin"
time.sleep(3)
elif cmd == "password":
print " Your password is, %s" % (password)
admin2()
elif cmd == "admin":
print " Already booted in admin mode"
admin2()
elif cmd == "format":
print " Formatting D:"
time.sleep(3)
elif cmd == "ver":
print " JDOS 1.4.0"
admin2()
elif cmd == "info":
print " JDOS-Admin Script 1.4.0. Created by Jacob Snyder [email protected]"
admin2()
elif cmd == "upd":
print ""
admin2()
elif cmd == "date":
from datetime import datetime
now = datetime.now()
print ' %s/%s/%s' % (now.month, now.day, now.year)
admin2()
elif cmd == "add":
inp1 = float(raw_input(" Enter 1st integer:"))
inp2 = float(raw_input(" Enter 2nd integer:"))
oup1 = inp1 + inp2
print " %s+%s=%s" % (inp1, inp2, oup1)
admin2()
elif cmd == "subtract":
inp1 = float(raw_input(" Enter 1st integer:"))
inp2 = float(raw_input(" Enter 2nd integer:"))
oup1 = inp1 - inp2
print " %s-%s=%s" % (inp1, inp2, oup1)
admin2()
elif cmd == "multiply":
inp1 = float(raw_input(" Enter 1st integer:"))
inp2 = float(raw_input(" Enter 2nd integer:"))
oup1 = inp1 * inp2
print " %sx%s=%s" % (inp1, inp2, oup1)
admin2()
elif cmd == "divide":
inp1 = float(raw_input(" Enter 1st integer:"))
inp2 = float(raw_input(" Enter 2nd integer:"))
oup1 = inp1/inp2
print " %s/%s=%s" % (inp1, inp2, oup1)
admin2()
elif cmd == "cmds" or cmd == "cmd":
print " cmds, date, add, subtract, multiply, divide, password, admin, format, ver, info, upd, exit"
admin2()
else:
print " Invalid command"
admin2()
admin2()
elif password == "cancel":
print " Canceling"
else:
print " Incorrect password"
admin()
elif cmd == "secret":
print " Congrats on finding the secret, Heres a cookie! . ____ ./- . \ |, - * | .\____/"
jdos2()
elif cmd == "date":
from datetime import datetime
now = datetime.now()
print ' %s/%s/%s' % (now.month, now.day, now.year)
jdos2()
elif cmd == "add":
inp1 = float(raw_input(" Enter 1st integer:"))
inp2 = float(raw_input(" Enter 2nd integer:"))
oup1 = inp1 + inp2
print "%s+%s=%s" % (inp1, inp2, oup1)
jdos2()
elif cmd == "subtract":
inp1 = float(raw_input(" Enter 1st integer:"))
inp2 = float(raw_input(" Enter 2nd integer:"))
oup1 = inp1 - inp2
print "%s-%s=%s" % (inp1, inp2, oup1)
jdos2()
elif cmd == "multiply":
inp1 = float(raw_input(" Enter 1st integer:"))
inp2 = float(raw_input(" Enter 2nd integer:"))
oup1 = inp1 * inp2
jdos2()
elif cmd == "divide":
inp1 = float(raw_input(" Enter 1st integer:"))
inp2 = float(raw_input(" Enter 2nd integer:"))
oup1 = inp1/inp2
print "%s/%s=%s" % (inp1, inp2, oup1)
jdos2()
elif cmd == "cmds" or cmd == "cmd":
print " cmds, date, add, subtract, multiply, divide, info, upd, ver, exit"
jdos2()
else:
print " Invalid command"
jdos2()
jdos2()
elif answer == "n":
print ""
else:
print " Invalid command"
jdos1()
jdos1()
을 구현하기 위해 사용할 수있는 명령의 거대한 목록을 얻을 것이다 읽을 코드가 많았습니다. 왜 뭔가 빠져 있다고 생각하니? 어떤 행동을 기대하며 대신 무엇을 보십니까? – jcolemang
프로그래밍에 대한 질문이 아니기 때문에이 질문을 주제와 관련이 없으므로 닫으려고합니다. – smarx