Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding VNC Info #83

Open
wants to merge 1 commit into
base: onionscan-0.2
Choose a base branch
from
Open

Adding VNC Info #83

wants to merge 1 commit into from

Conversation

s-rah
Copy link
Owner

@s-rah s-rah commented Oct 7, 2016

Playing with a new way of adding derived protocol info. Leaving as a PR for now.

TimedOut bool `json:"timedOut"`
}

type ProtocolInfo struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good approach to me. Maybe adding a port number in here would make sense to prepare for protocols and ports to be decoupled more (#46)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Idea. Added.

}

func (osr *OnionScanReport) AddProtocolInfo(protocolType string, protocolPort uint, protocolInfo interface{}) {
osr.ProtocolInfoList = append(osr.ProtocolInfoList, ProtocolInfo{protocolType, protocolPort, protocolInfo})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having a try at porting over some other scans to this system and just noticed that osr.ProtocolInfoList is not initialized to an empty list, so it will be null instead of [] if nothing is found. Dunno if that's a problem.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. We should probably initialize this for consistency.

I'm still trying to work out the best approach here....given a proper database structure. I should have more of an idea soon - I would hold off on porting any of the other scans until then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just the the BitcoinService was already so similar, and it seems like an elegant approach. But I'll hold it off for now.


type ProtocolInfo struct {
Type string `json:"type"`
Port uint `json:"port:`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should json:"port: be json:"port"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants