def quprnt(self, msg): if len(msg) + len(self.sysbuf) > 4095: self.sysbuf = "" # loseme() logger().error("Buffer overflow on user %s", "globme") # crapup("PANIC - Buffer overflow") self.sysbuf += msg
def makeuaf(dst): logger().debug(">>> ./makeuaf >%s" % (dst, )) x = UafBeing() x.sex = 0 x.level = 10033 x.score = 0 x.strength = 100 x.name = "Debugger" logger().debug(">>> fwrite(&%s, 1, sizeof(%s), stdout);" % (x, x))
def compileh(): """ Compile .h constructor """ print("Compiling .h constructor") logger().debug("./hmk >%s", "files.h") settings = hmk() logger().debug(settings) print(".h built")
def play(username=None, **kwargs): """ Play game """ if username is None: raise Exception("Args!") sig_init() print("Entering Game ....") user = User(username) print("Hello %s" % (user.fullname)) logger().info("GAME ENTRY: %s[%s]", user.fullname, user.cuserid()) talker(user) for i in range(5): do_signal(SIGALRM, user) do_signal(SIGTERM, user)
def bprintf(self, msg): if len(msg) > 235: logger().error("Bprintf Short Buffer overflow") # crapup("Internal Error in BPRINTF") # Now we have a string of chars expanded self.quprnt(msg)
def gcc(src, dst, libs=[]): logger().debug("gcc -w %s -o %s -l%s" % (src, dst, libs))
def forchk(): logger().debug("<<< forchk()")
def catnull(filename): logger().debug("cat </dev/null >%s" % (filename, ))
def sec_read(self, l): block = [] lw = l * self.SIZE_OF_LONG logger().debug("%d (%d)", self.pos, self.__pos) logger().debug("fread(%s, %d, %d, %s)", block, lw, 1, self.unit) return block
def open(self, unit): self.unit = unit self.__pos = 0 logger().debug("fopen(%s)", unit)
def gamecom(work): logger().debug("<<< gamecom(%s)", work)
def onlook(): logger().debug("<<< onlook()")
def on_timing(self): logger().debug("<<< on_timing()") return 0
def makeworld(filename="_usr_tmp_-iy7AM"): logger().debug("./makeworld.util") x = [[1, 1], ] + [0, ] * 600 with open(filename, "w") as a: sec_write(a, x, 0, 64)
def cp(src, dst): logger().debug("cp %s %s" % (src, dst))
def gamecom(msg): logger().debug("<<< gamecom(%s)", msg)
def closesnoop(self): logger().debug("<<< fcloselock(%s)" % (self))
def calibme(): logger().debug("<<< calibme()")
def seeplayer(p): logger().debug("<<< seeplayer(%s)", p) return True
def hitplayer(enemy, weapon): logger().debug("<<< hitplayer(%s, %s)", enemy, weapon)
def seek(self, pos): self.__pos = pos logger().debug("fseek(%s, %d, %d)", self.unit, self.pos, 0)
def dosumm(ades): logger().debug("<<< dosumm(%s)", ades)
def sec_write(self, block, l): lw = l * self.SIZE_OF_LONG logger().debug("%d (%d)", self.pos, self.__pos) logger().debug("fwrite(%s, %d, %d, %s)", block, lw, 1, self.unit)
def mkdir(dirname): logger().debug("mkdir %s" % (dirname, ))