How to save/download report as target IP

Hi,

I would like to download/save a report as the target IP instead of a seemingly random bunch of numbers and letters.

Can I do this?
Thanks.

Sure, you can cange the default export file name in the My Settings menu:
Web GUI > Extras > My Settings > Edit My Settings
For the different place holders that can be used, please see:

https://docs.greenbone.net/GSM-Manual/gos-6/en/web-interface.html#changing-the-user-settings

2 Likes

The random bunch of numbers and letters is a UUID that identifies the report globally.

1 Like

@Tino
Hi and thanks for your reply. :slight_smile:
I would like a report to have the target IP as the filename.
For example, if the target IP is 127.0.0.1 then the filename will be: 127.0.0.1.pdf
I have tried the following:
%T=tasks
%T=“tasks”
%tasks
%“tasks”

There are no syntax examples for this anywhere.
What am I doing wrong?
Thanks.
David.

Here is a syntax example, that might help you:
If you have a report with the task name “MyTask” and the UUID “1995fd52-5091-465c-bd06-4d82a883c596” the following filename template

%T-%N-%U

will result in a

report-MyTask-1995fd52-5091-465c-bd06-4d82a883c596.pdf

There is no option to get the target-IP of a given task and use that in the filename. All possible placeholders are listed in the manual at the link that Tino posted.

3 Likes

btw: A syntax example can be found right in the user settings where there are some filename templates already in place. You are free to add your own strings, if you like. For example:

%T-100%%foo+%u

will give you

report-100%foo+yourUsername.pdf

3 Likes

@Steffen
Hi and thanks for getting back to me. :smiley:
I guess I could name the task “127.0.0.1” or whatever the target IP is and then use the %N placeholder.

Thank you.
David.

Exactly, that would be a solution. I thought you were looking for an automated way to find the target IP via a placeholder, which is not possible.

1 Like

“not possible currently” I’d say. Could be a nice addition, don’t you think?
E.g. “print the report for the files, or send it to the person responsible for that machine”, or so.

to be perfectly honest, I don’t understand what your example is about and how it relates to finding a target IP of a report via a placeholder in the filename templates. I guess, I’m missing something here? Could you explain, please?

“Not possible” was definitely meant as “not possible currently” and not as “technically impossible”. The options we are offering atm are deducted from practical use and will cover most use cases. Of course, there will always be some additional ideas/requests of users, but we cannot offer all of them.

But you are always free to script such things for yourself, as we offer the complete API that GSA is using. This is not so relevant for GCE users, I guess, rather GSE, but still, it would be possible.

3 Likes

Sure.
The OP wanted to give the IP as a filename, so there must be some reason to do so.
For which I guessed just some imagined example of how this could help in organising some business procedure. So I thought this might be useful for other people.
Adding just another %variable to the list already offered by the supplied connector system doesn’t seem complicated to me (although I might miss some complications, like how to name a file if IP is in IPv6 namespace, so there might be some – solvable – formatting issues for naming a file like that, on different OSs).
So my contribution is kind of supporting an implied feature request you might have missed in the question of the OP.

I just didn’t get that it was related to the “implied feature request” as an example of a standard workflow where this might come in handy. Thanks for clarifying that.

2 Likes