-
Notifications
You must be signed in to change notification settings - Fork 599
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
base: onionscan-0.2
Are you sure you want to change the base?
Adding VNC Info #83
Conversation
TimedOut bool `json:"timedOut"` | ||
} | ||
|
||
type ProtocolInfo struct { |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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}) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:` |
There was a problem hiding this comment.
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"
?
Playing with a new way of adding derived protocol info. Leaving as a PR for now.