Skip to content

add unix timestamp support#85

Merged
amadejpapez merged 10 commits intobee-san:mainfrom
Granitosaurus:unix_ts
Jul 2, 2021
Merged

add unix timestamp support#85
amadejpapez merged 10 commits intobee-san:mainfrom
Granitosaurus:unix_ts

Conversation

@Granitosaurus
Copy link
Copy Markdown
Contributor

Hello,
for my first contributions I've picked something simple: unix epoch timestamps:

$ poetry run pywhat 1623914861

Possible Identification
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Matched Text ┃ Identified as         ┃ Description                                             ┃
┑━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ 1623914861   β”‚ Recent Unix Timestamp β”‚ Seconds elapsed since unix epoch: 1970, between year    β”‚
β”‚              β”‚                       β”‚ 2001 and 2286                                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1623914861   β”‚ Phone Number          β”‚ None                                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1623914861   β”‚ Unix Timestamp        β”‚ Seconds elapsed since unix epoch: 1970                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

and milliseconds:

$ poetry run pywhat 1623914861000

Possible Identification
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Matched Text  ┃ Identified as                     ┃ Description                                ┃
┑━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ 1623914861000 β”‚ Recent Unix Millisecond Timestamp β”‚ Milliseconds elapsed since unix epoch:     β”‚
β”‚               β”‚                                   β”‚ 1970, between year 2001 and 2286           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1623914861000 β”‚ Phone Number                      β”‚ None                                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1623914861000 β”‚ Unix Millisecond Timestamp        β”‚ Milliseconds elapsed since unix epoch:     β”‚
β”‚               β”‚                                   β”‚ 1970                                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

I think it would be great to support non-regex identifiers as this could have been done much more gracefully in python with datetime module. Nevertheless here's regex based implementation! :)

@bee-san
Copy link
Copy Markdown
Owner

bee-san commented Jun 17, 2021

I think it would be great to support non-regex identifiers
πŸ”œ πŸ˜‰

@bee-san
Copy link
Copy Markdown
Owner

bee-san commented Jun 17, 2021

@amadejpapez @piatrashkakanstantinass what do you think of the rarity here? 0.8? :)

@Granitosaurus
Copy link
Copy Markdown
Contributor Author

Granitosaurus commented Jun 17, 2021

There's another caveat here that timestamps < 1970-04-28 not gonna match as they're less than 8 numbers long - those first 5 months though are hard to reach without introducing a lot of false-positives

@ghost
Copy link
Copy Markdown

ghost commented Jun 17, 2021

@amadejpapez @piatrashkakanstantinass what do you think of the rarity here? 0.8? :)

I would use 0.5 here.

@bee-san
Copy link
Copy Markdown
Owner

bee-san commented Jun 17, 2021

@Granitosaurus thanks for the heads up! We'll add it to the tech-debt register (when I make one!) and when we introduce cooler checks we can do stuff like this :) I think the checks are a github issue somewhere πŸ˜“

@Granitosaurus
Copy link
Copy Markdown
Contributor Author

reduced rarity to 0.5 as recommended.

@bee-san
Copy link
Copy Markdown
Owner

bee-san commented Jun 26, 2021

Merge conflicts! :(

@ghost
Copy link
Copy Markdown

ghost commented Jul 2, 2021

@Granitosaurus merge conflicts 😒

@amadejpapez
Copy link
Copy Markdown
Collaborator

Should be good to go now

@ghost ghost requested a review from bee-san July 2, 2021 18:54
@amadejpapez amadejpapez merged commit 351b9ad into bee-san:main Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants