Shares-filters in command line

Started by Madrinux

Madrinux

Shares-filters in command line   01 March 2016, 04:52

Hey Friends

First of all i would like to congrats for developing such amazing tool like network scanner that works in a incredible speed and bring trustworthy results. This kind of quality is so rare to find these days.

Let me explain what I'm trying to do with command line.

I'm using this tool to detect shared folders that are open to permissions "write and read" at my environment. It is running once a week through a script "home made" that calls netscan.exe through command line and as result it drops xml file with the whole information.

Just as additional information bellow is the command line that we are calling.

netscan.exe /hide /auto:"%userprofile%\Downloads\Netscan\Reports\results.xml" /config:"%userprofile%\Downloads\Netscan\configuracao_1.xml"  /file:"%userprofile%\Downloads\Netscan\ranges.txt"

This configuration file that is loaded on xml was configured through GUI interface by menu view --> quick filter host --> shared folders. Radio button was changed to "specific types" and only 2 options (common and writable) was checked.

After save, if we open configuration in a text editor is possible to see that those options was saved in a right manner.


...
    <folder>
      <enabled>true</enabled>
      <common>true</common>
      <printer>false</printer>
      <writable>true</writable>
      <restricted>false</restricted>
      <administrative>false</administrative>
    </folder>
...

When we use by GUI everything works fine and as results we got only Read and Writable shares even when we save in a xml by the path File-->Save results (Ctrl+S)

So far so good, the problem here is when we use through command line like described above, looks like the option that filter out others shares than "Read" and "Writable" isn't taken in consideration by network scanner and xml file came with all shares that was found.


So my question is if has any way to use that filter option through a command line.


Thanks in advance for any help.
SoftPerfect Support forum - Andrew avatar image

Re: Shares-filters in command line   02 March 2016, 14:42

Unfortunately at the moment any filters are purely interactive. A saved filter doesn't apply when command line parameters are used.

I guess it could be useful to be able to filter scan results prior to export, I'll think how to implement it nicely.
madrinux

Re: Shares-filters in command line   04 March 2016, 05:35

Andrew, thanks for your reply.

You are 100% right, would be a good option do a filter before generate results, and at the time you improve i would appreciate if you let me know.

For while I have make a integration with SPLUNK and to make it work I had to create some specific configurations that I would like to share with community. Just in case anybody else need this kind of integration, I will put below a configuration code called props.conf that is used to parse the xml report inside Splunk.

[ NetScan ]
CHARSET=UTF-8
DATETIME_CONFIG=CURRENT
FIELDALIAS-rootfields=item.ip-address as IPADDRESS item.hostname as HOSTNAME item.mac-address as MACADD item.response-time as RESPTIMES item.folders.item.name as SHARE item.folders.item.attr as ATTRIBUTE
KV_MODE=xml
LINE_BREAKER=(</response-time>)
MUST_BREAK_AFTER=\</devices\>
NO_BINARY_CHECK=true
SHOULD_LINEMERGE=false
TRUNCATE=0
disabled=false
pulldown_type=true

I'm sorry if here isn't the best place to share this kind of information. Just let me know and I move to the right place.

Thanks again!

Sometimes you can get the answer faster if you try the forum search and/or have a look at the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **    **  **    **  **         ********  **     ** 
 **   **   **   **   **    **   **        **     ** 
 **  **    **  **    **    **   **        **     ** 
 *****     *****     **    **   ******    **     ** 
 **  **    **  **    *********  **        **     ** 
 **   **   **   **         **   **        **     ** 
 **    **  **    **        **   ********   *******  

Message: