Skip to content

Commit

Permalink
chore(sources): -
Browse files Browse the repository at this point in the history
  • Loading branch information
enenumxela committed Dec 11, 2024
1 parent 960e08d commit bf034ef
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/bevigil/bevigil.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type getSubdomainsResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.Bevigil.PickRandom()
key, err := cfg.Keys.Bevigil.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/builtwith/builtwith.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ type getDomainInfoResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.BuiltWith.PickRandom()
key, err := cfg.Keys.BuiltWith.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/censys/censys.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ type certSearchResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.Censys.PickRandom()
key, err := cfg.Keys.Censys.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/certspotter/certspotter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ type getCTLogsSearchResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.Certspotter.PickRandom()
key, err := cfg.Keys.Certspotter.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/chaos/chaos.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ type getSubdomainsResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.Chaos.PickRandom()
key, err := cfg.Keys.Chaos.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/driftnet/driftnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type TitleHTML struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
Expand Down Expand Up @@ -159,7 +159,7 @@ func (source *Source) Run(config *sources.Configuration, domain string) <-chan s

for _, value := range getResultsResData.Observations.SubjectCert.Values {
for entry := range value {
subdomains := config.Extractor.FindAllString(entry, -1)
subdomains := cfg.Extractor.FindAllString(entry, -1)

for i := range subdomains {
subdomain := subdomains[i]
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/fullhunt/fullhunt.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ type getSubdomainsResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.Fullhunt.PickRandom()
key, err := cfg.Keys.Fullhunt.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/intelx/intelx.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ type getResultsResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.Intelx.PickRandom()
key, err := cfg.Keys.Intelx.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/leakix/leakix.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ type getSubdomainsResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.LeakIX.PickRandom()
key, err := cfg.Keys.LeakIX.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/securitytrails/securitytrails.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ type getSubdomainsResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.SecurityTrails.PickRandom()
key, err := cfg.Keys.SecurityTrails.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/shodan/shodan.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ type getDNSResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.Shodan.PickRandom()
key, err := cfg.Keys.Shodan.PickRandom()
if key == "" || err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/urlscan/urlscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ type searchResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.URLScan.PickRandom()
key, err := cfg.Keys.URLScan.PickRandom()
if err != nil && !errors.Is(err, sources.ErrNoKeys) {
result := sources.Result{
Type: sources.ResultError,
Expand Down
4 changes: 2 additions & 2 deletions pkg/xsubfind3r/sources/virustotal/virustotal.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ type getSubdomainsResponse struct {

type Source struct{}

func (source *Source) Run(config *sources.Configuration, domain string) <-chan sources.Result {
func (source *Source) Run(cfg *sources.Configuration, domain string) <-chan sources.Result {
results := make(chan sources.Result)

go func() {
defer close(results)

key, err := config.Keys.VirusTotal.PickRandom()
key, err := cfg.Keys.VirusTotal.PickRandom()
if err != nil {
result := sources.Result{
Type: sources.ResultError,
Expand Down

0 comments on commit bf034ef

Please sign in to comment.