Giter Site home page Giter Site logo

pscap's Introduction

pscap

Tool to retrieve informations about the capabilities of a process.

Inspired by the command capshow in the following video : Gerlof Langeveld - Practical use of Linux capabilities (Full Talk) , at the ORNL CentOS Dojo (https://www.youtube.com/watch?v=WYC6DHzWzFQ)

Installation

mkdir build && cd build
cmake ..
make

Usage

Usage: pscap [OPTION]... [PID]
Print process capabilities, default print current PID

OPTIONS :
  -H  --human       print human readable
  -a, --all         print all process
  -l, --line        print on one line
  -h, --help        print all group IDs
  -v, --version     print version

Display capabilities of current process :

pid: 5769        tid: 5769
cmd: zsh
CapEff: 0x0000000000000000
CapPrm: 0x0000000000000000
CapInh: 0x0000000000000000
CapAmb: 0x0000000000000000
CapBnd: 0x000001ffffffffff

Display capabilities of one process :

$ pscap 1234
pid: 1234   tid: 1234
cmd: bash
CapEff:	0000000000001000
CapPrm:	0000000000001000
CapInh:	0000000000000000
CapAmb:	0000000000000000
CapBnd:	000001ffffffffff

Diplay cababilities human readable of one process :

$ pscap -pH 1234
pid: 1234   tid: 1234
cmd: bash
CapEff:	CAP_NET_ADMIN
CapPrm:	CAP_NET_ADMIN
CapInh:	NONE
CapAmb:	NONE
CapBnd:	ALL

Display capabilities of one process (one line) :

$ pscap -l 5769
PID     TID     COMMAND     EFFECTIVE               PERMITTED               INHERITABL              AMBIENT                 BOUND
5769    5769    zsh         0x0000000000000000      0x0000000000000000      0x0000000000000000      0x0000000000000000      0x000001ffffffffff

Display capabilities of all process :

$ pscap -la
PID     TID     COMMAND     EFFECTIVE               PERMITTED               INHERITABL              AMBIENT                 BOUND
10804   10804   Web Con     0x0000000000000000      0x0000000000000000      0x0000000000000000      0x0000000000000000      0x000001ffffffffff
10875   10875   RDD Pro     0x0000000000000000      0x0000000000000000      0x0000000000000000      0x0000000000000000      0x000001ffffffffff
10893   10893   kworker     0x000001ffffffffff      0x000001ffffffffff      0x0000000000000000      0x0000000000000000      0x000001ffffffffff

pscap's People

Contributors

arthurguyader avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.