Giter VIP home page Giter VIP logo

Comments (4)

yunzheng avatar yunzheng commented on July 22, 2024

Hi, we have a note about this in the README.md for windows that it only scans the root drive c:\

Thanks for your patch, do you think it's possible to check fi the drive is a logical drive and not a mapped network share?
I'm concerned that people deploy this in their networks and causes every host to scan the same share :D

Or maybe this is a non issue as you mention you can exclude drives using the --exclude flag. Happy to hear your thoughts.

from log4j-finder.

hvdort avatar hvdort commented on July 22, 2024

I have added some code to do it automatic:

  1. add reference on top:
    import wmi

  2. add line 301 - 306:
    parser.add_argument(
    "-a",
    "--all-drives",
    action="store_true",
    help="all local drives (windows)"
    )

  3. add this snippet after "print (FIGLET)":

    if args.all_drives:
    args.path.remove('/')
    for d in wmi.WMI().Win32_LogicalDisk():
    if d.DriveType == 3:
    args.path.append(d.Name+'\')

I'm not a programmer. Anybody else the possibility to make a pull request with this code?

If you compile the code at yourself run once: pip install wmi

from log4j-finder.

sibalzer avatar sibalzer commented on July 22, 2024

@yunzheng I didn't see this as a problem at first because under Linux all connected network drives are scanned as well. As proposed by @hvdort we can use the win32 api to get the logical drives. However i suggest to use it via ctypes to not create additional dependency. Working on it rn.

from log4j-finder.

sibalzer avatar sibalzer commented on July 22, 2024

bc1be64 adds a check for local drives.

from log4j-finder.

Related Issues (20)

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.