MCPcopy Create free account
hub / github.com/secdev/scapy / _time_to_filetime

Method _time_to_filetime

scapy/modules/ticketer.py:1625–1635  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

1623 return ASN1_GENERALIZED_TIME(datetime.strptime(x, self._TIME_FIELD.strf))
1624
1625 def _time_to_filetime(self, x):
1626 if isinstance(x, str) and x.strip() == "NEVER":
1627 return FILETIME(dwHighDateTime=0x7FFFFFFF, dwLowDateTime=0xFFFFFFFF)
1628 if isinstance(x, str):
1629 x = self._time_to_int(x)
1630 else:
1631 x = self._utc_to_mstime(x)
1632 return FILETIME(
1633 dwHighDateTime=(x >> 32) & 0xFFFFFFFF,
1634 dwLowDateTime=x & 0xFFFFFFFF,
1635 )
1636
1637 def _filetime_totime(self, x):
1638 if x.dwHighDateTime == 0x7FFFFFFF and x.dwLowDateTime == 0xFFFFFFFF:

Callers 2

create_ticketMethod · 0.95
edit_ticketMethod · 0.95

Calls 3

_time_to_intMethod · 0.95
_utc_to_mstimeMethod · 0.95
FILETIMEClass · 0.90

Tested by

no test coverage detected