Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
everything_becomes_f
Advanced tools
https://ja.wikipedia.org/wiki/すべてがFになる
https://en.wikipedia.org/wiki/Subete_ga_F_ni_Naru
このgemは、ゲーム化・漫画化・アニメ化・ドラマ化などもされた森博嗣のミステリー小説【すべてがFになる】に触発されて、
すべてがfになる everything_becomes_f
method と
すべてがfになったか、を判定する everything_became_f?
method
だけを提供するネタgemです。
Add this line to your application's Gemfile:
gem 'everything_becomes_f'
And then execute:
$ bundle
Or install it yourself as:
$ gem install everything_becomes_f
integer
1.everything_became_f? # => false
14.everything_became_f? # => false
15.everything_became_f? # => true
16.everything_became_f? # => false
255.everything_became_f? # => true
65534.to_s(16) # => "fffe"
65534.everything_became_f? # => false
65535.to_s(16) # => "ffff"
65535.everything_became_f? # => true
```
String
````ruby
'f'.everything_became_f? # => true
'fF'.everything_became_f? # => true
'FF'.everything_became_f? # => true
'ffffffffffffffffffffffffffffffffffffffffffffffffff'.everything_became_f? # => true
'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'.everything_became_f? # => true
```
Time
````ruby
ENV['TZ'] = 'UTC'
Time.new(1970, 1, 1, 0, 0, 15).everything_became_f? # => true
Time.new(1978, 7, 4, 21, 24, 15).everything_became_f? # => true
Time.new(2106, 2, 7, 6, 28, 14).to_i.to_s(16) # => "fffffffe"
Time.new(2106, 2, 7, 6, 28, 14).everything_became_f? # => false
Time.new(2106, 2, 7, 6, 28, 15).to_i.to_s(16) # => "ffffffff"
Time.new(2106, 2, 7, 6, 28, 15).everything_became_f? # => true
```
### everything_becomes_f
Integer
````ruby
0.everything_becomes_f # => 15
1.everything_becomes_f # => 15
10.everything_becomes_f # => 15
15.everything_becomes_f # => 15
16.everything_becomes_f # => 255
254.everything_becomes_f # => 255
255.everything_becomes_f # => 255
256.everything_becomes_f # => 4095
65534.everything_becomes_f # => 65535
65535.everything_becomes_f # => 65535
```
String
````ruby
'a'.everything_becomes_f # => 'f'
'af'.everything_becomes_f # => 'ff'
'fa'.everything_becomes_f # => 'ff'
'ffffffffffffffffffffffffffffffffffffffffffffffffffe'.everything_becomes_f # => 'fffffffffffffffffffffffffffffffffffffffffffffffffff'
'あいうえお'.everything_becomes_f # => 'fffff'
```
Time
````ruby
Time.new(1970, 1, 1, 0, 0, 14).everything_becomes_f # => Time.new(1970, 1, 1, 0, 0, 15)
Time.new(1970, 1, 1, 0, 0, 15).everything_becomes_f # => Time.new(1970, 1, 1, 0, 0, 15)
Time.new(1970, 1, 1, 0, 0, 16).everything_becomes_f # => Time.new(1970, 1, 1, 0, 4, 15)
Time.new(1978, 7, 4, 21, 24, 14).everything_becomes_f # => Time.new(1978, 7, 4, 21, 24, 15)
Time.new(1978, 7, 4, 21, 24, 15).everything_becomes_f # => Time.new(1978, 7, 4, 21, 24, 15)
Time.new(1978, 7, 4, 21, 24, 16).everything_becomes_f # => Time.new(2106, 2, 7, 6, 28, 15)
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/everything_becomes_f. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
FAQs
Unknown package
We found that everything_becomes_f demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.