Request a Kerberos TGT and add it to the local CCache See :func:`~scapy.layers.kerberos.krb_as_req` for the full documentation.
(
self,
upn,
ip=None,
key=None,
password=None,
realm=None,
fast=False,
armor_with=None,
spn=None,
x509=None,
x509key=None,
p12=None,
**kwargs,
)
| 2428 | self.update_ticket(i, tkt, resign=True, hash=hash, kdc_hash=kdc_hash) |
| 2429 | |
| 2430 | def request_tgt( |
| 2431 | self, |
| 2432 | upn, |
| 2433 | ip=None, |
| 2434 | key=None, |
| 2435 | password=None, |
| 2436 | realm=None, |
| 2437 | fast=False, |
| 2438 | armor_with=None, |
| 2439 | spn=None, |
| 2440 | x509=None, |
| 2441 | x509key=None, |
| 2442 | p12=None, |
| 2443 | **kwargs, |
| 2444 | ): |
| 2445 | """ |
| 2446 | Request a Kerberos TGT and add it to the local CCache |
| 2447 | |
| 2448 | See :func:`~scapy.layers.kerberos.krb_as_req` for the full documentation. |
| 2449 | """ |
| 2450 | if key is None and password is None: |
| 2451 | # Do we have the credential in our Keystore ? |
| 2452 | try: |
| 2453 | key = self.get_cred(upn) |
| 2454 | except ValueError: |
| 2455 | # It's okay if we don't have the cred. krb_as_req will prompt. |
| 2456 | pass |
| 2457 | |
| 2458 | # If `armor_with` is specified, get the armor ticket from our store |
| 2459 | armor_ticket, armor_ticket_skey, armor_ticket_upn = None, None, None |
| 2460 | if armor_with is not None: |
| 2461 | fast = True |
| 2462 | armor_ticket, armor_ticket_skey, armor_ticket_upn, _ = self.export_krb( |
| 2463 | armor_with |
| 2464 | ) |
| 2465 | |
| 2466 | res = krb_as_req( |
| 2467 | upn=upn, |
| 2468 | ip=ip, |
| 2469 | key=key, |
| 2470 | password=password, |
| 2471 | realm=realm, |
| 2472 | fast=fast, |
| 2473 | armor_ticket=armor_ticket, |
| 2474 | armor_ticket_upn=armor_ticket_upn, |
| 2475 | armor_ticket_skey=armor_ticket_skey, |
| 2476 | spn=spn, |
| 2477 | x509=x509, |
| 2478 | x509key=x509key, |
| 2479 | p12=p12, |
| 2480 | **kwargs, |
| 2481 | ) |
| 2482 | if not res: |
| 2483 | return |
| 2484 | |
| 2485 | self.import_krb(res) |
| 2486 | |
| 2487 | def request_st( |
nothing calls this directly
no test coverage detected