Showing posts with label tibco. Show all posts
Showing posts with label tibco. Show all posts

Friday, June 2, 2017

TIBCO Obfuscate encypt and decrypt : how to ...

Decrypt.java
import com.tibco.security.ObfuscationEngine;
public class Decrypt {

  public static void main(String[] args) throws Exception {
try {
    System.out.println(ObfuscationEngine.decrypt(args[0]));
} catch (Exception e ) {
}
    System.out.println(ObfuscationEngine.encrypt(args[0].toCharArray()));
  }
}
Compile
javac -cp /opt/tibco/RA1.1/tra/5.9/lib/TIBCrypt.jar  Decrypt.java
Run
java -cp .:/opt/tibco/RA1.1/tra/5.9/lib/TIBCrypt.jar:/opt/tibco/RA1.1/tpcl/5.9/lib/slf4j-log4j12-1.5.2.jar:/opt/tibco/RA1.1/tpcl/5.9/lib/slf4j-api-1.5.2.jar:/opt/tibco/RA1.1/tpcl/5.9/lib/log4j-1.2.15.jar:.  Decrypt "$@"
$ ./run.sh HelloWorld
#!oUNDLWlfuOH60LsUdl/qjrkGRADiglWRuw5Z4mGaUFU=
$ ./run.sh '#!oUNDLWlfuOH60LsUdl/qjrkGRADiglWRuw5Z4mGaUFU='
HelloWorld
#!UsKsGea13VhSx9H+IRO9xrgqRjFQn4RC2n8LybKGyPtgss4cYLwXbKt/Clc++ljpVQsAqhsMJE3sJqk9JY4xJi3LnRXW7rCK/layTvt+xXxqpZB9sX8JjqQUxNn1FrjokjFAKrPTNGM=

Tuesday, June 14, 2016

TIBCO BW/BE get all the global variables in a project

Go in the root of your project (where .beproject / .designtimelib lives):
find . -type f -exec grep '%%' {} \; | perl -ne '@x =m!.+%%([\/\w]*)%%.+$!xmi; printf "%s\n", $x[0] if $x[0] !~ /^\s*$/;' | sort | uniq
and then making markers for all the variables in the cdd
$ cat LegacyEvents.cdd | perl -ne '@x =m!(.+)%%([\/\w]*)%%(.+)$!xmi; if (@x) { printf "%s\$\{%s\}%s\n", $x[0], $x[1], $x[2];} else { print $_; }'

Friday, May 13, 2016

Inspecting TIBCO BE and BW ear files after build ear or studio tools

[ ! -f "${1}" ] && echo "$0: missing archive as argument." && exit 1;
[ -d ./ear ] && rm -fr ./ear
mkdir ear
cd ear
CWD=`pwd`
unzip ../${1}
unzip *.ear
mkdir sar par lib bar
cd $CWD/par
[ -f ../*.par ] && unzip ../*.par
cd $CWD/sar
[ -f ../*.sar ] && unzip ../*.sar
cd $CWD/bar
[ -f ../be.jar ] && unzip ../be.jar
cd $CWD/lib
[ -f ../lib.zip ] && unzip ../lib.zip