; = Dc@s1dkiZdkiZdkiZdkiZdki Z dk Tdk i Z dk iZdkiZdkiZdkiZdkiZdkiiZdkiiZdkiiZdkii i!Z!dk"i#i$Z$dk%i#iZ&dk'ii(Z(dk)i*i+Z+dk,ii i-Z-dk.i#i/Z/dk0ii i1Z1dk2ii i3Z3dk4ii i5Z5dk6i#i7Z7dk8ii i9Z9dk:ii(Z;dk<ii=Z=dk>ii i?Z?dk@ii=ZAdkBZBdkCZCdkDZDdkEZEdkFZFdkGZGdkHZHydkIiJiKZKWneLj o eMZKnXeiNiOiPiQdZRdZSdZTeUdeTeUdeSdeiVfdYZWdeiXfd YZYd e9iZfd YZ[d e3i\fd YZ]de^fdYZ_de5i`fdYZade^fdYZbde7icfdYZddedfdYZede^fdYZfde^fdYZgdeihfdYZidfdYZjd eifd!YZkd"eefd#YZld$ejfd%YZmd&eifd'YZnhd(hd)d*<d+d,<d-d.<<d/hd)d0<eod1<<d2hd3d4<d5d6<d7d8<d9d:<d;d<<d=d><d?d@<dAdB<d)dC<<dDhd3dE<d5dF<d7dG<d9dH<d;dI<d=dJ<d?dK<dAdL<d)dM< Say to all users connected to the Sshd. If the optional [--user] argument is given, it should be a registered user name and will specify a single user that the message will be sent to. isuserisinreplyssourceswallsUser not foundN(stargetsslensoptsstsappendsselfs _getMsgNicksmsgsnicksFalsesfounds availablespsprsports connectionsscsusers sendReplystextsTruesircs replySuccesssreply( sselfsircsmsgsargssoptsstextsprscspsnickstsfoundstargets((s./Sshd/plugin.pyswalls2       s sshdCapablesusers otherUserstextcCsMgi}|iiD]}||iq~}|i t d|dS(sLtakes no arguments Displays a list of available protocols. s%LN( sappends_[1]sselfs availablesvaluessssNAMEsLsircsreplysformat(sselfsircsmsgsargssLs_[1]ss((s./Sshd/plugin.pys protocolss3cCsgi}|iiD].}|io|d|i|ifqq~}t |o|i t d|n|i t dddS(sstakes no arguments Returns a list of running server, and the ports they are listening on. s%s on %ss%Ls%ssThere are no running gateways.N( sappends_[1]sselfs availablesvaluessssportsNAMEsLslensircsreplysformat(sselfsircsmsgsargssLs_[1]ss((s./Sshd/plugin.pysrunnings N cCs~|}||ijod|i|i oA| o|id|}n|i|i||iqz|i dndS(s [port] Start the server named by . If the optional [port] parameter is provided, the server is started listening on that port. Otherwise the autoStart registry value for that protocol is used. s%s.defaultPortsError: Already runningN( sprotocolspsselfs availablesports registryValuesstartsircs replySuccesssreply(sselfsircsmsgsargssprotocolsportsp((s./Sshd/plugin.pysstartssowners somethingsintcCsDx=|iD]2}||jo|i|i|iq q WdS(sA Stop the server named by . N(sselfs availablespsprotocolsstopsircs replySuccess(sselfsircsmsgsargssprotocolsp((s./Sshd/plugin.pysstop#s   c Csg} x|iD]}|i|}|iont|i}g}x$|iD]}|i |i i qLW|o'| i d||td|fqqqWt| o|itd| n|iddS(sd takes no arguments Returns a list of users connected via the Sshd plugin. s %s %s (%s)s%Ls#Users connected to the gateway: %L.s,There are no users connected to the gateway.N(srlsselfs availablespsprsportslens connectionssncshmlsisappendsusersnamesformatsircsreply( sselfsircsmsgsargssprsncspsishmlsrl((s./Sshd/plugin.pysusers.s     / cCsw|i}|iid||i|i}t i |i||i}|i d|t idi|dS(s+Handle a single command by creating a custom Message and feeding it to the irc object. @param command: The command received from Ssh. @type command: str @param user: The user object which will be tagged and used to reply. @type user: SshUsersReceived command %s from %s.sfromSshdiN(scmdsstripsselfslogsdebugsconshostmasksgetNickstosircmsgssprivmsgsmstagsworldsircssfeedMsg(sselfscmdsconsmsto((s./Sshd/plugin.pysreceivedCommandEs    cKsd|jo tdnt}d|jo tdnytii|d}Wn.tj o"|ii d|dt SnX|i d}|i d|d}|o;ti|d| o|ii d|dt Sqn|o;ti|d| o|ii d |dt Sq/nd |jo8|i|d  o|ii d |dt SqnQd |jo?|i|d|d  o|ii d |dt Sqnt S|i|d|d|d|_|i|i|SdS(sK will return a user object tagged with a hostmask for use or False sprotocolsNeed a protocol namesusernamesNeed a usernamesDenying %s. Unregistered user.s capabilitys %s.capabilitysDenying %s. Uncapable user.s(Denying %s. Uncapable protocol for user.spasswordsDenying %s. Bad password.sblobsDenying %s. Bad key.speerN(skwsKeyErrorsNonesusersircdbsuserssgetUsersselfslogsdebugsFalses registryValuescapspcapscheckCapabilitys checkPasswords _checkKeys_buildHostmasksgwhmsaddAuth(sselfskwscapsuserspcap((s./Sshd/plugin.pysgetUserYsD           cCstidiSdS(s'Return any (the first) bot nick it can.iN(sworldsircssnick(sself((s./Sshd/plugin.pysgetNickscCs|id|d|idti|f}ti|ti ot Snt |}xp|D]h}|i }t|djoCy&ti|d|jotSnWqtij oqXq`q`Wt SdS(NsChecking key for %s.s%s%s%ss authorizedii(sselfsdebugsuns datapathssosssepskeypathsaccesssF_OKsFalsesopensfslinessplitslslensbase64s decodestringsblobsTruesbinasciisError(sselfsunsblobsfslslineskeypath((s./Sshd/plugin.pys _checkKeys    cCs"d|tid ||fSdS(s2 build a new partly random hostmask and return it s %s%s!%s@%si N(sprotocolsutilssmktempsunspeer(sselfsunsprotocolspeer((s./Sshd/plugin.pys_buildHostmaskscCst|id<|i|idd|idtidf|id<|i|idd|idti|idf|id<|i|iddS(Nsroots%s%s%sskeysskeys.rsaAuthorizedDirs authorized(sDATAROOTsselfs datapathss_createIfNotExistingDirsossseps registryValue(sself((s./Sshd/plugin.pys_createDirectoriess  $-cCs,ti|ti oti|ndS(N(sossaccessspathsF_OKsmkdir(sselfspath((s./Sshd/plugin.pys_createIfNotExistingDirscCs7|i}d}|o|ii}n |i}|SdS(Ns(smsgs fromGatewaysconsnicksusersname(sselfsmsgsnickscon((s./Sshd/plugin.pys _getMsgNicks   cCs=x6ttttgD]"}|i}|||i|s(s__name__s __module__s__doc__s__init__s outFiltersdies getPluginHelpslogoutswrapswallsgetoptss protocolss availablesrunningsstartsoptionalsstopsuserssreceivedCommandsgetUsersgetNicks _checkKeys_buildHostmasks_createDirectoriess_createIfNotExistingDirs _getMsgNicks_importProtocolss _autoStartsdebug(((s./Sshd/plugin.pysSshds<       '       '      s SupybotPortalcBsFtZdZdZdefdYZdefdYZRS(NcCsztii|||i||i}|i}x.||gD] }|i||i |qEW|i ddS(NsPortal initialised.( sportalsPortals__init__sselfsrealms setCallbackssPasswordCheckerspwcsPublicKeyCheckerspkcscsregisterCheckersdebug(sselfsrealmscspkcspwc((s./Sshd/plugin.pys__init__s     cCs9|id|i|iitii||||SdS(Ns*Authenticating user %s with %s credentials( sselfsdebugscsusernames __class__s__name__sportalsPortalsloginsminds userclass(sselfscsminds userclass((s./Sshd/plugin.pyslogins sPasswordCheckercBs/tZdZeifZeifZdZ RS(s. SSH Username and Password Credential checker c Csu|iiid|i|iid|iid|id|i d|i }|o|Snt i tiSdS(Nstwisted checker checking %ssprotocolsusernamespasswordspeer(sselfscbPluginslogsdebugscrsusernamesgetUserscbServersNAMEspasswordspeersasfailuresFailureserrorsUnauthorizedLogin(sselfscrsa((s./Sshd/plugin.pysrequestAvatarIds   ( s__name__s __module__s__doc__scheckerssICredentialsCheckers__implements__s credentialssIUsernamePasswordscredentialInterfacessrequestAvatarId(((s./Sshd/plugin.pysPasswordCheckers   sPublicKeyCheckercBs/tZdZeifZeifZdZ RS(s Public key checker c Cs\|iid|iid|id|id|i}|o|Snt i t i SdS(Nsprotocolsusernamesblobspeer(sselfscbPluginsgetUserscbServersNAMEscrsusernamesblobspeersasfailuresFailureserrorsUnauthorizedLogin(sselfscrsa((s./Sshd/plugin.pysrequestAvatarIds  ( s__name__s __module__s__doc__scheckerssICredentialsCheckers__implements__sconchcredentialssISSHPrivateKeyscredentialInterfacessrequestAvatarId(((s./Sshd/plugin.pysPublicKeyCheckers   (s__name__s __module__s__init__sloginsobjectsPasswordCheckersPublicKeyChecker(((s./Sshd/plugin.pys SupybotPortals s SshAuthServercBs#tZdZdZdZRS(NcCsCti|dd}tii|i|}|i ||SdS(Nii( suserauthsgetNSspacketspasswords credentialssUsernamePasswordsselfsuserscsauth_all(sselfspacketspasswordsc((s./Sshd/plugin.pys auth_passwordsc Cs ti} t|d}ti|dd\}}}ti i d|} | |i itti| |i| |i| dt|| t i| | |}|oti|dpt}tii|i|||}|i||SdS(Niiisdatas publickey(suserauthsNSsordspacketshasSigsgetNSsalgNamesblobsrestskeyssgetPublicKeyObjectspubKeysselfs transports sessionIDschrsMSG_USERAUTH_REQUESTsusers nextServices objectTypesbsNones signatures credentialss SSHPrivateKeyscsauth_all( sselfspacketsbsrestshasSigs signaturescsblobsalgNamesNSspubKey((s./Sshd/plugin.pysauth_publickeys j!cCsoy|iiii|_Wn |iiid|_nX|ii|t|i i |i |dSdS(Nii( sselfs transportsgetPeershostscspeersportalsloginsNonesUsers addErrbacks _ebCheckKeyspacket(sselfscspacket((s./Sshd/plugin.pysauth_alls !(s__name__s __module__s auth_passwordsauth_publickeysauth_all(((s./Sshd/plugin.pys SshAuthServers  sSshServerFactorycBs>tZhde<dei2siN(sselfs primesKeysssortsbitssrealBitssrandomschoicesprimes(sselfsbitssrealBits((s./Sshd/plugin.pys getDHPrime*s cCsatii}|ii|_|i o$|i }|i d||_ n||_|SdS(Ns"diffie-hellman-group-exchange-sha1( sfactorys transportsSSHServerTransportstsselfs privateKeysskeysssupportedPublicKeyssprimesssupportedKeyExchangessskesremove(sselfsaddrsskest((s./Sshd/plugin.pys buildProtocol6s     ( s__name__s __module__sNones connections SSHConnectionsservicess startFactorys getDHPrimes buildProtocol(((s./Sshd/plugin.pysSshServerFactorys  sSshProtocolWrappercBsDtZdZdZdZdZdZdZdZRS(s. class representing each connected SSH client cCs&t|_||_|ii|dS(N(sNonesselfsshellsavatarsusers setCallbacks(sselfsavatar((s./Sshd/plugin.pys__init__Bs  cCs ||_dS(N(s windowSizesselfsinitialWindowSize(sselfsterms windowSizesattrs((s./Sshd/plugin.pysgetPtyIscCs|ii|d dS(Ni(sselfsshells updateSizes windowSize(sselfs windowSize((s./Sshd/plugin.pys windowChangedLscCs|iddS(Nsclosed(sselfsdebug(sself((s./Sshd/plugin.pysclosedOscCsdS(N((sselfsprotoscmd((s./Sshd/plugin.pys execCommandSscCsq|iodSn|i|i}|i|||_|i|i|i||it i |dS(s( called back on a successful connection N( sselfsshellsProtocolsusers shellProtocols setCallbackss windowChangedsinitialWindowSizesmakeConnectionstransssessions wrapProtocol(sselfstranss shellProtocol((s./Sshd/plugin.pys openShellVs    ( s__name__s __module__s__doc__s__init__sgetPtys windowChangedscloseds execCommands openShell(((s./Sshd/plugin.pysSshProtocolWrapper@s      s SshSessioncBstZdZdZRS(NssessioncOs8tii|||d|_|i|i|_ dS(Ns( schannels SSHChannels__init__sselfsargsskwsbufsProtocolWrappersavatarssession(sselfsargsskw((s./Sshd/plugin.pys__init__cs (s__name__s __module__snames__init__(((s./Sshd/plugin.pys SshSessionassSshRealmcBs#tZeiZdZdZRS(NcCs ||_dS(N(s userClasssselfsUser(sselfs userClass((s./Sshd/plugin.pys__init__kscGsM|id|i|i|i|}|i||d|dfSdS(Ns Requesting avatar type %s for %sicCstS(N(sNone(((s./Sshd/plugin.pysss(sselfsdebugsUsersavatarIdsgwhmsavs setCallbackss interfaces(sselfsavatarIdsminds interfacessav((s./Sshd/plugin.pys requestAvatarns   (s__name__s __module__sportalsIRealms__implements__s__init__s requestAvatar(((s./Sshd/plugin.pysSshRealmhs  s SshProtocolcBsttZdZdZdZdZdZdZdZdZ d Z d Z d Z d Z RS( NcCs2||_||_g|_g|_|idS(N(susersselfsconslineBufsoncloseCallbackssdoBeforeConnect(sselfsuser((s./Sshd/plugin.pys__init__vs     cCsdS(N((sself((s./Sshd/plugin.pysdoBeforeConnect}scCs|ii|idS(N(sselfscbServers authorisedsuser(sself((s./Sshd/plugin.pysconnectionMadescCs0di|i}|i|g|_|SdS(Ns(sjoinsselfslineBufslinesreceivedCommand(sselfsline((s./Sshd/plugin.pys receivedLines  cCs|id|idS(s Called on loss of connection. sConnection lost. Reason: %sN(sselfsdebugsreasons getTraceback(sselfsreason((s./Sshd/plugin.pysconnectionLostscCs|idS(N(sselfs_loseConnection(sself((s./Sshd/plugin.pysloseConnectionscCsg|iiiii|iiiy|iii|iWn t j o|i dnXdS(Ns$Connection already removed. Somehow!( sselfsusersconns transportsloseConnections clearAuthscbServers connectionssremoves ValueErrorsdebug(sself((s./Sshd/plugin.pys_loseConnections cCsFx?|D]7}|tdjo|iq|ii|qWdS(Ni (sdatascschrsselfs receivedLineslineBufsappend(sselfsdatasc((s./Sshd/plugin.pys dataReceiveds cCs3|id||ii|ii||idS(s' receives a line, and returns a prompt sReceived command %s from %sN(sselfsdebugscmdsusershostmaskscbPluginsreceivedCommand(sselfscmd((s./Sshd/plugin.pysreceivedCommands cCsdS(N((sselfsysx((s./Sshd/plugin.pys updateSizescCstid|ii|dS(Ni(sreactors callLatersselfs transportswritesdata(sselfsdata((s./Sshd/plugin.pyswritescKs:d|jpt|ddjo|i|ndS(Nssourcesstatus(skwsAssertionErrorsselfswritesreply(sselfsreplyskw((s./Sshd/plugin.pys writeReplys(s__name__s __module__s__init__sdoBeforeConnectsconnectionMades receivedLinesconnectionLostsloseConnections_loseConnections dataReceivedsreceivedCommands updateSizeswrites writeReply(((s./Sshd/plugin.pys SshProtocolus           s ShellProtocolcBsLtZdZdZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZddZd Z d!Z!d"Z"d#Z#d$Z$d%Z%d&Z&RS('NiiiicCs@d|_t|_|i|_t||_t||_ dS(Ni( sselfslinePossTrues insertModesS_DATAsstates SshTerminalsterms SshHistoryshist(sself((s./Sshd/plugin.pysdoBeforeConnects    cCs2|i|ijo|i|n |i|ijo@|tdjo|i|_q.|i||i|_n|i|ijoUt |ddddgjo|i |_||_ q.|i ||i|_nP|i|i jo |i |i |i|_n|id||i|_dS(Ni[i2i3i4i5s"Somehow %s is in an illegal state.(sselfsstatesS_DATAsreceivedDataCharscs S_ESCAPEDschrs S_BRACEKETEDsreceivedShortEscapeCharsordsS_TILDEDstildsreceivedEscapeCharsreceivedTildEscapeCharsdebug(sselfsc((s./Sshd/plugin.pyscharacterReceiveds$    cCs"x|D]}|i|qWdS(N(sdatascsselfscharacterReceived(sselfsdatasc((s./Sshd/plugin.pys dataReceivedscCs?ti|||it|o|ii|ndS(N(s SshProtocolsreceivedCommandsselfscmds writeNewlineslenshistsappend(sselfscmd((s./Sshd/plugin.pysreceivedCommands  cCsFd|iid}|hd|iii<d|ii<SdS(Ns%s s shell.ps1susernamesnick(sselfscbPlugins registryValuesfssusersnamesgetNick(sselfsfs((s./Sshd/plugin.pysps1scCsrdt|}t||ot||n;t|djo|i|n|idt|dS(Ns character_%sisUnprinted character (%s)(sordscsfnameshasattrsselfsgetattrsreceivedPrintableCharsdebug(sselfscsfname((s./Sshd/plugin.pysreceivedDataChars cCs|ioVdi|i|i}|ii|i||ii |||id|_n0||i|i<|ii ||id7_dS(Nsi( sselfs insertModesjoinslineBufslinePoss remaindersinsertscsterms insertCharswrite(sselfscs remainder((s./Sshd/plugin.pysreceivedPrintableChars cCsWdt|}t||ot||n |iiid|t|dS(Ns escape_%ss Unhandled escape character %s %s( sordscsfnameshasattrsselfsgetattrscbPluginslogsdebug(sselfscsfname((s./Sshd/plugin.pysreceivedEscapeChars cCsWdt|}t||ot||n |iiid|t|dS(Ns tildescape_%ssUnhandled tilda character %s %s( sordscsfnameshasattrsselfsgetattrscbPluginslogsdebug(sselfscsfname((s./Sshd/plugin.pysreceivedTildEscapeChars cCsTdt|}t||ot||n|iiidt|dS(Ns shescape_%ss%Unhandled short escape character (%s)( sordscsfnameshasattrsselfsgetattrscbPluginslogsdebug(sselfscsfname((s./Sshd/plugin.pysreceivedShortEscapeChar s cCs|idS(N(sselfs writeNewline(sself((s./Sshd/plugin.pys character_3scCs|iid|idS(Nslogout(sselfscbPluginsreceivedCommandsuser(sself((s./Sshd/plugin.pys character_4scCs|idS(N(sselfsreceivedBackspace(sself((s./Sshd/plugin.pys character_8scCs|i|_dS(N(sselfs S_ESCAPEDsstate(sself((s./Sshd/plugin.pys character_27scCs|idS(N(sselfs receivedLine(sself((s./Sshd/plugin.pys character_13!scCs|idS(N(sselfsreceivedBackspace(sself((s./Sshd/plugin.pys character_127$scCs|idS(N(sselfsreceivedDelete(sself((s./Sshd/plugin.pys tildescape_51'scCs8|i |_|iodpd}|ii|dS(sInsert key handlers Insert ModesOverwrite ModeN(sselfs insertModesmsgsterms blinkMessage(sselfsmsg((s./Sshd/plugin.pys tildescape_50*s cCs/|iidi|i}|i|dS(Ns(sselfshists getPrevioussjoinslineBufsprevsupdateLineBuffer(sselfsprev((s./Sshd/plugin.pys escape_650scCs/|iidi|i}|i|dS(Ns(sselfshistsgetNextsjoinslineBufsnextsupdateLineBuffer(sselfsnext((s./Sshd/plugin.pys escape_664scCs=|it|ijo |ii|id7_ndS(Ni(sselfslinePosslenslineBufsterms cursorRight(sself((s./Sshd/plugin.pys escape_678s cCs4|idjo |ii|id8_ndS(Nii(sselfslinePossterms cursorLeft(sself((s./Sshd/plugin.pys escape_68=s cCsZ|it|ijo=|ii|i|iiddi|i|indS(Ns(sselfslinePosslenslineBufspopsterms insertCharsjoin(sself((s./Sshd/plugin.pysreceivedDeleteBscCsm|idjoY|id8_|ii|i|ii|iiddi|i|indS(Niis(sselfslinePosslineBufspopsterms cursorLefts insertCharsjoin(sself((s./Sshd/plugin.pysreceivedBackspaceIs  cCs|iSdS(N(sselfsps1(sself((s./Sshd/plugin.pyspsPsscCs$|iid|i|fdS(Ns%s%s(sselfsterms replaceLinespsss(sselfss((s./Sshd/plugin.pyswriteReplacelineSscCsMgi}|D]}||q~|_t|i|_|i|dS(N( sappends_[1]ssslsselfslineBufslenslinePosswriteReplaceline(sselfsss_[1]sl((s./Sshd/plugin.pysupdateLineBufferVs*cCs|iddS(Ns (sselfswrite(sself((s./Sshd/plugin.pyswriteNewlineChars[scCs|i|iddS(Ns(sselfswriteNewlineCharssupdateLineBuffer(sself((s./Sshd/plugin.pys writeNewline^s cCs|i|dS(N(sselfswritesps(sselfsps((s./Sshd/plugin.pys writePromptbscKsHd||}|i||ddjo|in |idS(Ns[%(source)s] <%(inreply)s> %%ssinreplysmotd(skwsreplysrsselfswriteswriteNewlineCharss writeNewline(sselfsreplyskwsr((s./Sshd/plugin.pys writeReplyes  cCsdS(N((sselfspositionstotal((s./Sshd/plugin.pyshistoryFeedbacknscCs|ii||dS(N(sselfsterms updateSizesysx(sselfsysx((s./Sshd/plugin.pys updateSizeqs('s__name__s __module__sS_DATAs S_ESCAPEDs S_BRACEKETEDsS_TILDEDsdoBeforeConnectscharacterReceiveds dataReceivedsreceivedCommandsps1sreceivedDataCharsreceivedPrintableCharsreceivedEscapeCharsreceivedTildEscapeCharsreceivedShortEscapeChars character_3s character_4s character_8s character_27s character_13s character_127s tildescape_51s tildescape_50s escape_65s escape_66s escape_67s escape_68sreceivedDeletesreceivedBackspacespsswriteReplacelinesupdateLineBufferswriteNewlineCharss writeNewlines writePrompts writeReplyshistoryFeedbacks updateSize(((s./Sshd/plugin.pys ShellProtocolsJ                             s SshTerminalcBstZdZdZdZdZdZddZddZdd Z d Z d Z d Z d Z dZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(NcCs||_d|_d|_dS(Ni(s connectionsselfsconswidthsheight(sselfs connection((s./Sshd/plugin.pys__init__us  cCs||_||_dS(N(swidthsselfsheight(sselfsheightswidth((s./Sshd/plugin.pys updateSizezs cCs|id|dS(Ns%s(sselfswritess(sselfss((s./Sshd/plugin.pys sendEscape~scCs|iddS(Nsc(sselfs sendEscape(sself((s./Sshd/plugin.pysresetscCs|iddS(Ns[2J(sselfs sendEscape(sself((s./Sshd/plugin.pys eraseScreensscCs|id|dS(Ns[%sB(sselfs sendEscapesi(sselfsi((s./Sshd/plugin.pys cursorDownscCs|id|dS(Ns[%sD(sselfs sendEscapesi(sselfsi((s./Sshd/plugin.pys cursorLeftscCs|id|dS(Ns[%sC(sselfs sendEscapesi(sselfsi((s./Sshd/plugin.pys cursorRightscCs|iddS(Ns[H(sselfs sendEscape(sself((s./Sshd/plugin.pys cursorHomescCs|id||fdS(Ns[%s;%sH(sselfs sendEscapesysx(sselfsysx((s./Sshd/plugin.pyscursorToscCs|iddS(Ns7(sselfs sendEscape(sself((s./Sshd/plugin.pys cursorSavescCs|iddS(Ns8(sselfs sendEscape(sself((s./Sshd/plugin.pys cursorUnsavescCs|iddS(Ns[K(sselfs sendEscape(sself((s./Sshd/plugin.pys eraseLineEndscCs|iddS(Ns[2K(sselfs sendEscape(sself((s./Sshd/plugin.pys eraseLinescCs|id||fdS(Ns[%s;%sr(sselfs sendEscapesstartsend(sselfsstartsend((s./Sshd/plugin.pys setScrollRowsscCs|iddS(Ns[r(sselfs sendEscape(sself((s./Sshd/plugin.pyssetScrollEntirescCs%|i|id|idS(NsM(sselfs cursorSaves sendEscapes cursorUnsave(sself((s./Sshd/plugin.pysscrollUps  cCs|iddS(Ns[0m(sselfs sendEscape(sself((s./Sshd/plugin.pys attrResetscGs|iddi|dS(Ns[%sms;(sselfs sendEscapesjoinsargs(sselfsargs((s./Sshd/plugin.pys attrColorsscCs|iddS(Ns[7m(sselfs sendEscape(sself((s./Sshd/plugin.pys attrReversescCs.|i|itd|i|dS(Ni (sselfs eraseLineswriteschrss(sselfss((s./Sshd/plugin.pys replaceLines cCs|t|p t| o|int|o|i|nt|o$|i||it|ndS(N(slens remainderscsselfs eraseLineEndswrites cursorLeft(sselfscs remainder((s./Sshd/plugin.pys insertChars   cCs|idS(N(sselfs eraseLine(sselfsbg((s./Sshd/plugin.pysfillLinescCsd|||fSdS(Ns[%s;%sm%s(sfgsbgstext(sselfstextsfgsbg((s./Sshd/plugin.pysgetColoredTextscCs%|i|i||idS(N(sselfs attrReverseswritesss attrReset(sselfss((s./Sshd/plugin.pys writeReverses  cCs|ii|dS(N(sselfsconswritess(sselfss((s./Sshd/plugin.pyswrites(s__name__s __module__s__init__s updateSizes sendEscapesresets eraseScreens cursorDowns cursorLefts cursorRights cursorHomescursorTos cursorSaves cursorUnsaves eraseLineEnds eraseLines setScrollRowsssetScrollEntiresscrollUps attrResets attrColorss attrReverses replaceLines insertCharsfillLinesgetColoredTexts writeReverseswrite(((s./Sshd/plugin.pys SshTerminalts4                        s SshHistorycBs2tZdZdZdZdZdZRS(Nics1g_d_d_d_dS(Niscs iidtiS(Ni(sprotoshistoryFeedbacksselfspositionslenshistory((sselfsproto(s./Sshd/plugin.pyss(sselfshistoryspositionslineBufsfeedBack(sselfsproto((sselfsprotos./Sshd/plugin.pys__init__s   cCsJ|iid|t|i|ijo|iind|_dS(Nii(sselfshistorysinsertsitemslensMAXspopsposition(sselfsitem((s./Sshd/plugin.pysappendscCs|idjo ||_nt|ioM|it|idjo|id|_n|i|i|iSn|SdS(Nii(sselfspositionsbufslineBufslenshistorysfeedBack(sselfsbuf((s./Sshd/plugin.pys getPreviouss  cCsh|idjod|_|iSnA|idjo,|id|_|i|i|iSn|SdS(Niii(sselfspositionslineBufsfeedBackshistorysbuf(sselfsbuf((s./Sshd/plugin.pysgetNexts   (s__name__s __module__sMAXs__init__sappends getPrevioussgetNext(((s./Sshd/plugin.pys SshHistorys    sSshUsercBs,tZdZdZdZdZRS(NcCs)tii|||_|i|_dS(N(savatars ConchUsers__init__sselfsusersgwhmshostmask(sselfsuser((s./Sshd/plugin.pys__init__s c Cs&|id|d|d|d|SdS(Ns remoteWindowsremoteMaxPacketsdatasavatar(sselfsSessions windowSizes maxPacketsdata(sselfs channelTypes windowSizes maxPacketsdata((s./Sshd/plugin.pys lookupChannels cKs|ii||dS(N(sselfscons writeReplysreplyskw(sselfsreplyskw((s./Sshd/plugin.pys sendReply scCs|iidS(N(sselfsconsloseConnection(sself((s./Sshd/plugin.pyscloses(s__name__s __module__s__init__s lookupChannels sendReplysclose(((s./Sshd/plugin.pysSshUsers   s SshServercBstZdZeZeZeZe Z e Z e ZeZeZdZdZdZdZdZdZdZd Zd Zd ZRS( NsshellcCs^g|_t|_||_|i|t|_|i|i |_ |i|i dS(N( sselfs connectionssNoneslistenerscbscbPlugins setCallbackssportspreinitsFactsfactory(sselfscb((s./Sshd/plugin.pys__init__s      csIi__d_d_i_dS(Ncs&iiidii|f|S(Ns Sshd: [%s] %s( sselfscbPluginslogsdebugsobjs __class__s__name__sssa(sssa(sobjsself(s./Sshd/plugin.pys+scs&iiidii|f|S(Ns Sshd: [%s] %s( sselfscbPluginslogsinfosobjs __class__s__name__sssa(sssa(sobjsself(s./Sshd/plugin.pys.s(sselfscbPluginsobjscbServersdebugsinfos setCallbacks(sselfsobj((sselfsobjs./Sshd/plugin.pys setCallbacks(s   cCsg|i|i|i|i_|i|i_|i|iid<|i |i_ |i |i _ dS(Ns ssh-userauth( sselfs portalisesloadKeyssSesssUsersSessionsAuthsFactsservicessWrapsProtocolWrappersProtsProtocol(sself((s./Sshd/plugin.pyspreinit3s  cCs0|id|i|tid|i|dS(NsStarting %s server on port %si(sselfsinfosNAMEsportsreactors callLatersstartListening(sselfsport((s./Sshd/plugin.pysstart<scCs!|id|i|idS(NsStopping %s server(sselfsinfosNAMEs stopListening(sself((s./Sshd/plugin.pysstop@scCsd|i oUyti||i|_Wn#tij o|i|nXt ||_ndS(N( sselfsportsreactors listenTCPsfactoryslistenersterrorsCannotListenErrorsstartsint(sselfsport((s./Sshd/plugin.pysstartListeningDs  cCsN|i|i}|i|t||_|i|i_|iddS(NsInitialised Twisted portal.( sselfsRealsUsersrealms setCallbackss SupybotPortalsportalsFactsdebug(sselfsrealm((s./Sshd/plugin.pys portaliseLs  cCsn|id|i|i|ii||i|ii ddddd|i|idddddS(Ns#New gateway connection on %s for %ssmotdsinreplyssourcesstatusshostmask( sselfsinfosusershostmasksNAMEs connectionssappends sendReplyscbPlugins registryValue(sselfsuser((s./Sshd/plugin.pys authorisedSs   cCsFx|iD]}|iq W|io|iit|_ndS(N(sselfs connectionsscscloseslisteners stopListeningsNonesport(sselfsc((s./Sshd/plugin.pys stopListening^s    cCs|iid}d|ti|iidf}tii | ot d|nd|ti|iidf}tii | o t dn|i dhdt id |<|i_hdt id |<|i_dS( Nskeyss%s%s%sskeys.rsaPrivateFiles!The SSH private key is missing %sskeys.rsaPublicFilesThe SSH public key is missingsLoading RSA keyssssh-rsasfilename(sselfscbPlugins datapathsssshdirsossseps registryValuesprivpathspathsexistss ExceptionspubpathsdebugskeyssgetPublicKeyStringsFacts publicKeyssgetPrivateKeyObjects privateKeys(sselfssshdirspubpathsprivpath((s./Sshd/plugin.pysloadKeyses""  !(s__name__s __module__sNAMEsSshUsersUsers SshAuthServersAuths SshSessionsSesssSshRealmsReals ShellProtocolsProtsSshServerFactorysFactsSshProtocolWrappersWraps SshProtocolsPROTOCOLs__init__s setCallbacksspreinitsstartsstopsstartListenings portalises authoriseds stopListeningsloadKeys(((s./Sshd/plugin.pys SshServers&     sPyUsercBstZdZRS(NcKs,|djo|iid||ndS(Ns s %s(sreplysselfscons writeReplyskw(sselfsreplyskw((s./Sshd/plugin.pys sendReplyvs (s__name__s __module__s sendReply(((s./Sshd/plugin.pysPyUseruss PyProtocolcBsWtZdZdZdZdZdZdZdei fdYZ RS( Ncs`t_tiiihdii<dti d<dd<_ dS(Nshostmasksircis feedCommandcsii|iS(N(sselfscbPluginsreceivedCommandsssuser(ss(sself(s./Sshd/plugin.pyss( sFalsesselfsmores SshProtocolsconnectionMades Interpretersusershostmasksworldsircss interpreter(sself((sselfs./Sshd/plugin.pysconnectionMade{s   cGsdSdS(Ns>>> ((sselfsa((s./Sshd/plugin.pysps1scGsdSdS(Ns... ((sselfsa((s./Sshd/plugin.pysps2scCs]|id||ii|ii||_|it |o|i i |ndS(NsReceived command %s from %s( sselfsdebugscmdsusershostmasks interpreterspushsmores writeNewlineslenshistsappend(sselfscmd((s./Sshd/plugin.pysreceivedCommands    cCs%|io |ip |iSdS(N(sselfsmoresps2sps1(sself((s./Sshd/plugin.pyspsscKs^|i|idd|ddjo0d|jo|ddjo|iqZndS(Ns s ssources interpretersinreplysmotd(sselfswritesreplysreplaceskws writeNewline(sselfsreplyskw((s./Sshd/plugin.pys writeReplyss InterpretercBsBtZedZdZdZdZdfdYZRS(NcCs*tii||||_|idS(N(scodesInteractiveInterpreters__init__sselfs_localsshandlers resetBuffer(sselfshandlers_locals((s./Sshd/plugin.pys__init__s cCsy|ii|di|i}ti}|i |i t_|i |d}|t_| o|i n|SdS(Ns s (sselfsrbufsappendscmdsjoinscssyssstdoutsos FileWrappershandlers runsourcesmores resetBuffer(sselfscmdscsosmore((s./Sshd/plugin.pyspushs  cCs#|ii|iddddS(Ns ssources traceback(sselfshandlers sendReplysmsgsrstrip(sselfsmsg((s./Sshd/plugin.pyswritescCs g|_dS(N(sselfsrbuf(sself((s./Sshd/plugin.pys resetBufferss FileWrappercBs8tZdZdZdZdZdZdZRS(NisnormalcCs ||_dS(N(sosself(sselfso((s./Sshd/plugin.pys__init__scCsdS(N((sself((s./Sshd/plugin.pysflushscCs|ii|dddS(Nssources interpreter(sselfsos sendReplysdata(sselfsdata((s./Sshd/plugin.pyswritescCs|idi|dS(Ns(sselfswritesjoinslines(sselfslines((s./Sshd/plugin.pys writeliness(s__name__s __module__s softspacesstates__init__sflushswrites writelines(((s./Sshd/plugin.pys FileWrappers    (s__name__s __module__sNones__init__spushswrites resetBuffers FileWrapper(((s./Sshd/plugin.pys Interpreters    ( s__name__s __module__sconnectionMadesps1sps2sreceivedCommandspss writeReplyscodesInteractiveInterpreters Interpreter(((s./Sshd/plugin.pys PyProtocolzs     sPyServercBstZdZeZeZedee fhZ ede e fhZ ede fhZedee fhZedefhZRS(Nspyshells PyAuthServers PySessionsPyRealmsPyServerFactorysPyProtocolWrapper(s__name__s __module__sNAMEsPyUsersUsers PyProtocolsProtstypes SshAuthServersobjectsAuths SshSessionsSesssSshRealmsRealsSshServerFactorysFactsSshProtocolWrappersWrap(((s./Sshd/plugin.pysPyServerssUiUsercBstZdZdZRS(NcKs|ii||dS(N(sselfscons write_replysreplyskw(sselfsreplyskw((s./Sshd/plugin.pys sendReplyscCs!|iii|iidS(N(sselfsconstermssetScrollEntiresloseConnection(sself((s./Sshd/plugin.pyscloses(s__name__s __module__s sendReplysclose(((s./Sshd/plugin.pysUiUsers sweightsdefaultisboldisdimis underlineiisfgsblackisredisgreeni syellowi!sbluei"smagentai#scyani$swhitei%i'sbgi(i)i*i+i,i-i.i/i1sms%s%%s%ss0sTCharcBs,tZdZdZdZdZRS(NcKsU||_h|_x<tD]4}||jo||}nd}||i||iii|iiidd|iiid|dS(Niis %s(sselfsdisplaystermscursorTosheightswritess(sselfss((s./Sshd/plugin.pys displayLinexs#cCsd|_|iii|iii|i o<x,|i|iii D]}|i |qLWt |_n|iii dS(Ni( sselfsactsdisplaysterms cursorSaves eraseScreensvisibleslinessheightsls displayLinesTrues cursorUnsave(sselfsl((s./Sshd/plugin.pys makeVisible|s   icCsdS(N((sselfsend((s./Sshd/plugin.pys displayBuffers( s__name__s __module__sBUFMAXsTrues TIMESTAMPsacts__init__s writeLines displayLines makeVisibles displayBuffer(((s./Sshd/plugin.pysUiPaneds   s UiDisplaycBstZdZdZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZdZdZdZdZdZdZRS(NcCsQ||_t|i|_h|_g|_|idd|_ |i dS(Nsstatus( sterminalsselfstermsUiBars getSbarDatasbarspanesswindowss createPanes currentPanesreset(sselfsterminal((s./Sshd/plugin.pys__init__s     cCsIt}|i|i|ii|iid ddd|i SdS(Nisbgsblacks %s( sTStringstssaddsselfspaness currentPanestitlestermswidthsrender(sselfsts((s./Sshd/plugin.pys getTbarDatas .c Csg} t}|itid| i|t}|i|i i i i i |iddd|i|i i i i| i|t}|i|ii|i|id|i|i| i|t}|idg}xt|iD]\}}|i|i}|oh} |djohdd<} nJ|djohd d <} n*|d johdd <d d <} nt|d jo|idddn|id|| qqW| i|| SdS(Ns%H:%Ms@sfgscyans:sAct: iisweightsboldismagentais,s%s(stsssTStringststimesaddstimesstrftimesappendstsnicksselfstermsconsusersnamescbPluginsgetNickstschanswindowssindexs currentPanestsactsactss enumeratesispspanessactsattrsslen( sselfststimestsnicksisactsstschanspsactstsactstsssattrs((s./Sshd/plugin.pys getSbarDatasB              cCs|ii|ii|iidd|iidtdd|ii|ii|iidd|ii|i i |iidd|iidtdd|ii|iidd|ii|i |ii t id|idS(Niis[%smsbgsblacki-(sselfsterms cursorSavescursorTosheights sendEscapes TSETTINGSs eraseLineswritesbarsrenders getTbarDatas cursorUnsavesreactors callLatersdrawSbar(sself((s./Sshd/plugin.pysdrawSbars    cCs1|iid|iid|i|idS(Ni(sselfsterms setScrollRowssheightssetVisiblePanes currentPane(sself((s./Sshd/plugin.pysresetscCsLx!|iD]}t|i|_q W|i|i||_|idS(N( sselfspanesspsFalsesvisiblesnames makeVisibles currentPanesdrawSbar(sselfsnamesp((s./Sshd/plugin.pyssetVisiblePanes   cCsI|d}|djo|t|ijo|i|i|ndS(Nii(snumberswidslensselfswindowsssetVisiblePane(sselfsnumberswid((s./Sshd/plugin.pyssetVisibleWindows #cCs2t||i|<|ii||i|SdS(N(sUiPanesselfspanessnameswindowssappend(sselfsname((s./Sshd/plugin.pys createPanesc Ksy|d}Wn#tj od}||dy|i|dSWq{tj o|i|dSq{Xqd}n|ddgjo|i|Sn1|ddgjo|i|iSn |idSdS( Ns%sssourcesbncsinreplysstatusslogsmenusls(sselfsdebugspanesskwssourcesKeyErrors createPanes currentPane(sselfskwssource((s./Sshd/plugin.pysgetPanes    c Kst}d|jo|d|iiiijottfSn|dddddddd d gjo|i ||Sn|i d d d dd|i |d|i dd d ddt |}|i |||fSdS(Nsinreplyscommandsjoinspartsnicksquitskicksmodesbouncestopics (sTStringstsskwsselfstermsconscbPluginsgetNicksFalsesformat_bnc_usereventsssaddslensind(sselfssskwstssind((s./Sshd/plugin.pys format_bncs -)  cKslt}|iddddd|id|iddddd|i|ddd |id ddddd |j o|d |d shmsextras(scyans) (sTStringstssaddskwslensindsssk(sselfssskwstssindsk((s./Sshd/plugin.pysformat_bnc_userevent"s&     !cKs=t}|iddd|i||tdfSdS(Ns ***Status sfgsgreen(sTStringstssaddssslen(sselfssskwsts((s./Sshd/plugin.pys format_status6s  cKs=t}|iddddd|i||dfSdS(Ns>>> sweightsboldsfgsbluei(sTStringstssaddss(sselfssskwsts((s./Sshd/plugin.pysformat_outfilter<s  cKs=t}|iddd|i||tdfSdS(Ns ***Completer sfgsmagenta(sTStringstssaddssslen(sselfssskwsts((s./Sshd/plugin.pysformat_completerBs  cKst}|iddddd|iddddd|i|d|iddddd|i||tdfSdS( Ns ***Registry sfgsyellowsweightsdims[sinreplys] (sTStringstssaddskwssslen(sselfssskwsts((s./Sshd/plugin.pysformat_registryHs  cKsst}|iddddd|i|ddddd|iddddd|i||d fSdS( Ns[sfgsblacksweightsboldsinreplysyellows] i(sTStringstssaddskwss(sselfssskwsts((s./Sshd/plugin.pys format_menuRs   cKst}xh|D]`}|iddddd|id||i||dd|idddddqW|i||d fSdS( Ns i(sTStringstsskwsksaddss(sselfssskwsksts((s./Sshd/plugin.pysformat_defaultZs  cKs|iddt}|iddddd|i|d|idddddt|to|i|n|i||d fSdS( Nsinreplys.s[sfgsbluesweightsbolds] i(skws setdefaultsTStringstssadds isinstancesssappend(sselfssskwsts((s./Sshd/plugin.pys format_lsds  cKs=t}|iddddd|i||dfSdS(Ns<<< sfgsgreensweightsboldi(sTStringstssaddss(sselfssskwsts((s./Sshd/plugin.pysformat_commandqs  cKs=t}|iddddd|i||dfSdS(Ns***Help sfgsbluesweightsdimi(sTStringstssaddss(sselfssskwsts((s./Sshd/plugin.pys format_helpws  cCso|ido |dSn|idjo;|iido d}nd}d||i|fSn|SdS(Ns/isstatuss#smsgspmsgs%s %s %s(scmds startswithsselfs currentPanesbcmd(sselfscmdsbcmd((s./Sshd/plugin.pys buildCommand}s  cCs'|idjodSn d|iSdS(Nsstatuss [(status)] $ s[%s] (sselfs currentPane(sself((s./Sshd/plugin.pyspss(s__name__s __module__s__init__s getTbarDatas getSbarDatasdrawSbarsresetssetVisiblePanessetVisibleWindows createPanes writeReplysgetPanes format_bncsformat_bnc_userevents format_statussformat_outfiltersformat_completersformat_registrys format_menusformat_defaults format_lssformat_commands format_helps buildCommandsps(((s./Sshd/plugin.pys UiDisplays.  "      #          sRegistryBrowsercBsStZdZdZdZddZdZdZdZd Z RS( NcCs+ttiidt|_||_dS(Ns getChildren(sdictsconfssupybots getValuessTruesselfsrootsdisplay(sselfsdisplay((s./Sshd/plugin.pys__init__scCsFt|io.|ii}|iddi|SndSdS(Ns(%s) Select ? ss%(Ctrl-G to cancel) Enter new Value > (slensselfscodesskeyssksssortsjoin(sselfsks((s./Sshd/plugin.pyspss  cCsLt|_h|_g|_g|_t|_t|_h|_h|_ dS(N( sNonesselfs currentValscurrentscurdirsscurvalssnamessdirscodesskeys(sself((s./Sshd/plugin.pys resetCurrents       ssupybotcCs|it}|djo ti}n/||ijo|i|}nd|GHdSt|d pt |i o|i ||n|i ||SdS(Nssupybotsbad regentry %ssvalue( sselfs resetCurrentsNonesentrysnamesconfssupybotsrootshasattrslens getValuess selectedDirs selectedValue(sselfsnamesentry((s./Sshd/plugin.pys _showGroups    $cCsj||ijo:|i|}|ii|ddd||i|Sn|iidddd|dS(Nssourcesmenusinreplys Unlinked key.(skeysselfscodessksdisplays writeReplys _showGroup(sselfskeysk((s./Sshd/plugin.pys receivedKeys  cCsL||_|ii|dddd|ii|iddddtSdS(Nssourcesregistrysinreplyseds-(snamesselfs currentvalsdisplays writeReplyssvalsvaluesTrue(sselfsnamessval((s./Sshd/plugin.pys selectedValues    cCs||_||_x~|iD]p\}}||i|sReturn to command mode.sss.Switch to "supybot" directory in registry modesps6Switch to "supybot.plugins" directory in registry modesns7Switch to "supybot.networks" directory in registry modesds:Switch to "supybot.directories" directory in registry modesrs4Switch to "supybot.reply" directory in registry modesKey Press Helpssourceshelpsinreplyskeysisweightsbolds islss?s represents the Escape key( sgensconfsselfsdisplays writeReplysisTStringstssadd(sselfsistssconfsgen((s./Sshd/plugin.pys displayHelps3      cCs|idddS(Ns^sssupybot(sselfs setMenuMode(sself((s./Sshd/plugin.pys shescape_115scCs|idddS(Ns^nssupybot.networks(sselfs setMenuMode(sself((s./Sshd/plugin.pys shescape_110scCs|idddS(Ns^pssupybot.plugins(sselfs setMenuMode(sself((s./Sshd/plugin.pys shescape_112scCs|idddS(Ns^rs supybot.reply(sselfs setMenuMode(sself((s./Sshd/plugin.pys shescape_114scCs|idddS(Ns^dssupybot.directories(sselfs setMenuMode(sself((s./Sshd/plugin.pys shescape_100scCs|iidi|i\}}}t|djod|}n|oi|i ||oQ|i i d|ddddx.|D]"}|i i |dddd qWqndS( Nsis%s sDisplaying list for "%s".ssources completersinreplyslss.( sselfs completerscompletesjoinslineBufscsrsirslensupdateLineBuffersdisplays writeReplysres(sselfscsressirsr((s./Sshd/plugin.pys doCompletes'  cCs|i|ijo,|iidddd||i|_n&t|_|iidddd||i di |i dS(NsEntered command mode.ssourcesmenusinreplysCancelled Edit.s( sselfsmodesM_MENUsdisplays writeReplysinreplys M_COMMANDsNonescommandHandlerswriteReplacelinesjoinslineBuf(sselfsinreply((s./Sshd/plugin.pyssetCommandModes   ssupybotcCsU|iidddd||i|_|ii||i di |i dS(NsEntered menu mode.ssourcesmenusinreplys( sselfsdisplays writeReplysinreplysM_MENUsmodes regbrowses _showGroupsrootswriteReplacelinesjoinslineBuf(sselfsinreplysroot((s./Sshd/plugin.pys setMenuModes   (!s__name__s __module__s M_COMMANDsM_MENUsmodesconnectionMadesgenerateCompletionStringss write_replysreceivedCommandsreceivedPrintableCharsps1sps2spsswriteNewlineCharss updateSizeshistoryFeedbacks character_7s character_9sreceivedShortEscapeChars shescape_27s shescape_47s changeScreens shescape_49s shescape_50s displayHelps shescape_115s shescape_110s shescape_112s shescape_114s shescape_100s doCompletessetCommandModes setMenuMode(((s./Sshd/plugin.pys UiProtocol's>                       sUiServercBstZdZeZeZedee fhZ ede e fhZ ede fhZedee fhZedefhZRS(Nsuis UiAuthServers UiSessionsUiRealmsUiServerFactorysUiProtocolWrapper(s__name__s __module__sNAMEsUiUsersUsers UiProtocolsProtstypes SshAuthServersobjectsAuths SshSessionsSesssSshRealmsRealsSshServerFactorysFactsSshProtocolWrappersWrap(((s./Sshd/plugin.pysUiServerss PlainServercBstZdZedeefhZeZede efhZ ede efhZ ede fhZedeefhZedefhZRS(Nsplains PlainUsers PbAuthServers PbSessionsPbRealmsPbServerFactorysPbProtocolWrapper(s__name__s __module__sNAMEstypesSshUsersobjectsUsers SshProtocolsProts SshAuthServersAuths SshSessionsSesssSshRealmsRealsSshServerFactorysFactsSshProtocolWrappersWrap(((s./Sshd/plugin.pys PlainServerscCst odSntidtii}ti|}t |d}|i ||i ti|dti|}t d|d}|i ||i dS(Niswis%s.pub(sRSAsgeneratescommonsentropys get_bytesskeyskeyssmakePrivateKeyStringsprivksopensfilepathsprivfswritesclosesosschmodsmakePublicKeyStringspubkspubf(sfilepathspubfspubksprivfskeysprivk((s./Sshd/plugin.pyskeygens   (s supybot.logslogs supybot.confsconfs supybot.ircdbsircdbs supybot.utilssutilss supybot.worldsworldssupybot.commandsssupybot.schedulesschedulessupybot.pluginsspluginsssupybot.ircmsgssircmsgsssupybot.ircutilssircutilsssupybot.registrysregistryssupybot.callbackss callbacksstwisted.cred.errorscredserrorstwisted.cred.portalsportalstwisted.conch.avatarsconchsavatarstwisted.conch.ssh.keysssshskeysstwisted.internet.defersinternetsdeferstwisted.internet.errorsterrorstwisted.cred.checkersscheckersstwisted.python.failurespythonsfailurestwisted.conch.ssh.commonscommonstwisted.internet.reactorsreactorstwisted.conch.ssh.channelschannelstwisted.conch.ssh.factorysfactorystwisted.conch.ssh.sessionssessionstwisted.internet.protocolsprotocolstwisted.conch.ssh.userauthsuserauthstwisted.conch.checkerss conchcheckersstwisted.cred.credentialss credentialsstwisted.conch.ssh.connections connectionstwisted.conch.credentialssconchcredentialssossmd5ssysscodestimesbase64sbinasciisCrypto.PublicKey.RSAs PublicKeysRSAs ImportErrorsNonessupybots directoriessdatasdirizesDATAROOTs sshdCapables sshdSources addConvertersPluginsSshdsPortals SupybotPortalsSSHUserAuthServers SshAuthServers SSHFactorysSshServerFactorysobjectsSshProtocolWrappers SSHSessions SshSessionsSshRealmsProtocols SshProtocols ShellProtocols SshTerminals SshHistorys ConchUsersSshUsers SshServersPyUsers PyProtocolsPyServersUiUsersTrues TSETTINGSsESC_OsESC_CsESC_TsESC_Rs TDEFAULTSsksappendsTCharsTStringsUiBarsUiPanes UiDisplaysRegistryBrowsers Completers UiProtocolsUiServers PlainServerskeygensClass(MsSshUsersdefersircdbsprotocolsreactorsutilssuserauthsircmsgss SshProtocolsPyServerssessionsTCharsconfspluginssESC_Os SupybotPortals SshServersSshProtocolWrapperscodesUiServerscheckersslogsbase64sbinasciisfactorysUiBarsESC_CsRegistryBrowsers PlainServersUiPanesterrors ShellProtocols SshAuthServersESC_RschannelscommonsESC_TsClasssscheduleskeysstimes UiProtocolsSshds sshdSourcessyss callbackssportalsregistrys SshSessionsworlds PyProtocolsconchcredentialssmd5s SshTerminalsUiUsersTStrings TDEFAULTSs credentialssfailuresoss sshdCapablesSshRealms SshHistorysRSAs UiDisplayskeygens connectionsavatars CompleterserrorsDATAROOTsksSshServerFactorys conchcheckerss TSETTINGSsPyUsersircutils((s./Sshd/plugin.pys?$s                     640! <d&dI   "-%{