本文整理汇总了Python中impacket.krb5.ccache.CCache.fromTGT方法的典型用法代码示例。如果您正苦于以下问题:Python CCache.fromTGT方法的具体用法?Python CCache.fromTGT怎么用?Python CCache.fromTGT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类impacket.krb5.ccache.CCache
的用法示例。
在下文中一共展示了CCache.fromTGT方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: saveTicket
# 需要导入模块: from impacket.krb5.ccache import CCache [as 别名]
# 或者: from impacket.krb5.ccache.CCache import fromTGT [as 别名]
def saveTicket(self, ticket, sessionKey):
logging.info('Saving ticket in %s' % (self.__user + '.ccache'))
from impacket.krb5.ccache import CCache
ccache = CCache()
ccache.fromTGT(ticket, sessionKey, sessionKey)
ccache.saveFile(self.__user + '.ccache')
示例2: saveTicket
# 需要导入模块: from impacket.krb5.ccache import CCache [as 别名]
# 或者: from impacket.krb5.ccache.CCache import fromTGT [as 别名]
def saveTicket(self, ticket, sessionKey):
logging.info('Saving ticket in %s' % (self.__target.replace('/', '.') + '.ccache'))
from impacket.krb5.ccache import CCache
ccache = CCache()
if self.__server == self.__domain:
ccache.fromTGT(ticket, sessionKey, sessionKey)
else:
ccache.fromTGS(ticket, sessionKey, sessionKey)
ccache.saveFile(self.__target.replace('/','.') + '.ccache')
示例3: saveTicket
# 需要导入模块: from impacket.krb5.ccache import CCache [as 别名]
# 或者: from impacket.krb5.ccache.CCache import fromTGT [as 别名]
def saveTicket(self, tgt, sessionKey):
logging.info('Saving ticket in %s' % (self.__target.replace('/', '.') + '.ccache'))
from impacket.krb5.ccache import CCache
ccache = CCache()
ccache.fromTGT(tgt, sessionKey, sessionKey)
ccache.saveFile(self.__target.replace('/','.') + '.ccache')