Giter VIP home page Giter VIP logo

jarwalker's Introduction

jarwalker

Jarwalker is an old command line cli utility to walk into jars wars ears rars looking for regular expressions, dumping contents of manifest and service files, optionally deleting and rewriting nested jar files in place for hot patching.

Print the manifest in the jar file

jarwalker common/lib/log4j.jar -m MANIFEST -c

Manifest-Version: 1.0
Implementation-Vendor: JBoss Inc.
Name: org/apache/log4j/
Implementation-Vendor: "Apache Software Foundation"
Implementation-Title: log4j
Implementation-Version: 1.2.14

Recursively scan nested jars looking matching entry

jarwalker ./ -x node_modules -r -m 'log4j.*JndiLookup'

jarwalker ./ -r -m 'log4j.*SocketServer'

{

    "[/jboss-5.1.0.GA/client/log4j.jar]": [

        "org/apache/log4j/net/SocketServer.class",

        "org/apache/log4j/net/SimpleSocketServer.class"

    ],

    "[jboss-5.1.0.GA/common/lib/log4j.jar]": [

        "org/apache/log4j/net/SocketServer.class",

        "org/apache/log4j/net/SimpleSocketServer.class"

    ]

}

Delete from and rewrite nested jars matching entry

jarwalker ./ -r -m 'log4j.*Jndi' -d -d

  
java -jar target/jarwalker-1.0-SNAPSHOT.jar mofokom.jarwalker.JarWalker --help

Usage java -jar jarwalker-1.0-SNAPSHOT.jar -j [-m regexp] [-c] [-d] [-o] directory|jar|ear|war ...");
        -j detect duplicate jars files
        -r recursive for directories
        -f flat output. don't group by jar file
        -m regexp to match
        -c show contents of jar files
        -d delete matching entries from jars (readOnly) -d -d (overwrite)
        -x exclude regex
        -v verbose, -v -v even more verbose
        -h help"

jarwalker's People

Contributors

warrenc-juno avatar warrenc5 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.