Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Creates a manipulable date string in the form of 'YYYYmmdd'.
>>> ds = DateString('20180624')
>>> ds
'20180624'
>>> ds = DateString('2018/06/24')
>>> ds
'20180624'
>>> ds = DateString('2018-06-24')
>>> ds
'20180624'
>>> ds = DateString('2018年6月24日')
>>> ds
'20180624'
>>> ds = DateString(datetime.datetime(2018, 6, 24))
>>> ds
'20180624'
>>> today = DateString.today()
>>> yesterday = DateString.today(-1)
>>> tomorrow = DateString.today(1)
>>> DateString('2018/6/24') + 90
'20180922'
>>> DateString('2018-09-22') - 90
'20180624'
>>> DateString('2018-09-22') - '2018/06/24'
90
>>> DateString('2018/9/22') - datetime.datetime(2018, 6, 24)
90
>>> DateString('20180922') - DateString('2018-6-24')
90
>>> DateString('2018年9月22日') - pd.Timestamp('2018-06-24')
90
>>> DateString('20180922') == '2018/9/22'
True
>>> DateString('20180922') == '2018/6/24'
False
>>> DateString('20180922') >= '2018/6/24'
True
>>> DateString('20180922') >= '2019/9/22'
False
>>> ds = DateString('2018-06-24')
>>> ds.year
2018
>>> ds.month
6
>>> ds.day
24
>>> ds.dayofweek
6
>>> ds.dayofyear
175
>>> ds.is_leap_year
False
>>> ds.is_weekday
False
>>> ds.is_weekend
True
pandas.date_range()
.>>> begin_ds = DateString('2019-01-01')
>>> end_ds = DateString('2019/1/3')
>>> pd.date_range(begin_ds, end_ds)
DatetimeIndex(['2019-01-01', '2019-01-02', '2019-01-03'], dtype='datetime64[ns]', freq='D')
>>> ds = DateString('20180624')
>>> ds.reformat()
'2018-06-24'
>>> ds.reformat(delimiter='/')
'2016/06/24'
FAQs
Creates a manipulable date string in the form of 'YYYYmmdd'.
We found that date-string demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.