Skip to content

Instantly share code, notes, and snippets.

View alpoza's full-sized avatar

Albert alpoza

View GitHub Profile
import com.jcraft.jsch.JSch
import com.jcraft.jsch.Session
import com.jcraft.jsch.UserInfo
import com.jcraft.jsch.Channel
import com.jcraft.jsch.ChannelExec
def sshHost = '10.1.2.132'
def sshUser = 'root'
def sshPass = '******'
def sshPort = 22
import org.codehaus.groovy.scriptom.*
import org.codehaus.groovy.scriptom.tlb.office.*
import org.codehaus.groovy.scriptom.tlb.office.excel.*
import org.codehaus.groovy.scriptom.tlb.office.word.WdSaveOptions
def waitTime = 10000
Scriptom.inApartment {
def dir = new File("c:/temp")
def xlApp = new ActiveXObject('Excel.Application')
def wdApp = new ActiveXObject('Word.Application')
listFilter = []
jarfile = ""
fileList = []
cli = new CliBuilder(usage:"jinspect [-hHvxXoawmISMWjJrgGcCpPlLZZZ] jarfile [filename ...]")
cli.with {
h(longOpt:'help', 'show help')
v(longOpt:'verbose', 'be more verbose')
X(longOpt:'save', 'save specified files (including path) to the current directory instead of printing them')
l(longOpt:'war', 'list war contents; specify again to include more information')