fiche logo

fiche

  •  0 ratings
In category: Pastebins

About fiche

Command line pastebin, all you need is netcat.

  •   501  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: N/A  
  •   N/A  
  •   N/A  
  •  Latest commit: N/A  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about fiche

fiche Build Status

Command line pastebin for sharing terminal output.

Client-side usage

Self-explanatory live examples (using public server):

echo just testing! | nc termbin.com 9999
cat file.txt | nc termbin.com 9999

In case you installed and started fiche on localhost:

ls -la | nc localhost 9999

You will get an url to your paste as a response, e.g.:

http://termbin.com/ydxh

You can use our beautification service to get any paste colored and numbered. Just ask for it using l.termbin.com subdomain, e.g.:

http://l.termbin.com/ydxh

Useful aliases

You can make your life easier by adding a termbin alias to your rc file. We list some of them here:


Pure-bash alternative to netcat

Linux/macOS:

alias tb="(exec 3<>/dev/tcp/termbin.com/9999; cat >&3; cat <&3; exec 3<&-)"

echo less typing now! | tb

See #42, #43 for more info.


tb alias

Linux (Bash):

echo 'alias tb="nc termbin.com 9999"' >> .bashrc

echo less typing now! | tb

macOS:

echo 'alias tb="nc termbin.com 9999"' >> .bash_profile
echo less typing now! | tb

Copy output to clipboard

Linux (Bash):

echo 'alias tbc="netcat termbin.com 9999 | xclip -selection c"' >> .bashrc

echo less typing now! | tbc

macOS:

echo 'alias tbc="nc termbin.com 9999 | pbcopy"' >> .bash_profile
echo less typing now! | tbc

Remember to reload the shell with source ~/.bashrc or source ~/.bash_profile after adding any of provided above!


Requirements

To use fiche you have to have netcat installed. You probably already have it - try typing nc or netcat into your terminal!


Server-side usage

Installation

  1. Clone:

    git clone https://github.com/solusipse/fiche.git
  2. Build:

    make
  3. Install:

    sudo make install

Using Ports on FreeBSD

To install the port: cd /usr/ports/net/fiche/ && make install clean. To add the package: pkg install fiche.

See #86 for more info.


Usage

usage: fiche [-D6epbsdSolBuw].
             [-d domain] [-L listen_addr ] [-p port] [-s slug size]
             [-o output directory] [-B buffer size] [-u user name]
             [-l log file] [-b banlist] [-w whitelist] [-S]

These are command line arguments. You don't have to provide any of them to run the application. Default settings will be used in such case. See section below for more info.

Settings


Output directory -o

Relative or absolute path to the directory where you want to store user-posted pastes.

fiche -o ./code
fiche -o /home/www/code/

Default value: ./code


Domain -d

This will be used as a prefix for an output received by the client. Value will be prepended with http.

fiche -d domain.com
fiche -d subdomain.domain.com
fiche -d subdomain.domain.com/some_directory

Default value: localhost


Slug size -s

This will force slugs to be of required length:

fiche -s 6

Output url with default value: http://localhost/xxxx, where x is a randomized character

Output url with example value 6: http://localhost/xxxxxx, where x is a randomized character

Default value: 4


HTTPS -S

If set, fiche returns url with https prefix instead of http

fiche -S

Output url with this parameter: https://localhost/xxxx, where x is a randomized character


User name -u

Fiche will try to switch to the requested user on startup if any is provided.

fiche -u _fiche

Default value: not set

WARNING: This requires that fiche is started as a root.


Buffer size -B

This parameter defines size of the buffer used for getting data from the user. Maximum size (in bytes) of all input files is defined by this value.

fiche -B 2048

Default value: 32768


Log file -l

fiche -l /home/www/fiche-log.txt

Default value: not set

WARNING: this file has to be user-writable


Ban list -b

Relative or absolute path to a file containing IP addresses of banned users.

fiche -b fiche-bans.txt

Format of the file: this file should contain only addresses, one per line.

Default value: not set

WARNING: not implemented yet


White list -w

If whitelist mode is enabled, only addresses from the list will be able to upload files.

fiche -w fiche-whitelist.txt

Format of the file: this file should contain only addresses, one per line.

Default value: not set

WARNING: not implemented yet


Running as a service

There's a simple systemd example:

[Unit]
Description=FICHE-SERVER

[Service]
ExecStart=/usr/local/bin/fiche -d yourdomain.com -o /path/to/output -l /path/to/log -u youruser

[Install]
WantedBy=multi-user.target

WARNING: In service mode you have to set output directory with -o parameter.


Example nginx config

Fiche has no http server built-in, thus you need to setup one if you want to make files available through http.

There's a sample configuration for nginx:

server {
    listen 80;
    server_name mysite.com www.mysite.com;
    charset utf-8;

    location / {
            root /home/www/code/;
            index index.txt index.html;
    }
}

License

Fiche is MIT licensed.

Comments (0)

Please login to join the discussion on this project.

fiche Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

pCloud Lifetime

Popular Projects

FluxBB

in Social Networks and Forums
 33k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Libreddit

in Social Networks and Forums
 7k    0    1    0  

Dashboard

in Personal Dashboards
 6k    0    0    0  

Audiobookshelf

in Audio Streaming
 6k    0    1    0  

CasaOS

in Self-hosting Solutions
 5k    0    0    0  

Mediagoblin

in Photo and Video Galleries
 4k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Tube Archivist

in Automation
 3k    0    1    0  

OneDev

in Project Management
 2k    0    0    0  

iodine

in Proxy
 2k    0    0    0  

Alf.io

in Booking and Scheduling
 2k    0    0    0  

sysPass

in Password Managers
 1k    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

MokinToken logo
MokinToken cover

MokinToken

Clientside encrypted pastebin using tweetnacl.

Snippet Box logo
Snippet Box cover

Snippet Box

Snippet Box is a simple self-hosted app for organizing your…

Pastila logo
Pastila cover

Pastila

Minimalistic paste service. Single page, zero click experie…