This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
) | |
func newProducer(readTimeout time.Duration, products ...string) <-chan string { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func newProducer(readTimeout time.Duration, products ...string) <-chan string { | |
results := make(chan string) | |
go func() { | |
defer close(results) | |
for _, product := range products { | |
select { | |
case results <- product: | |
// didn't time out | |
case <-time.After(readTimeout): | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
grmon "github.com/bcicen/grmon/agent" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func newProducer(products ...string) <-chan string { | |
results := make(chan string) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func newProducer(products ...string) <-chan string { | |
results := make(chan string) | |
go func() { | |
defer close(results) | |
for _, product := range products { | |
results <- product |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Subfinder v2</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css"> | |
<script defer src="https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script> | |
<script src="https://cdn.rawgit.com/picatz/builderJS/8ca588fc/src/builder.js"></script> | |
</head> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"net" | |
"os/exec" | |
"strconv" | |
"strings" | |
"sync" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import asyncio | |
class PortScanner: | |
def __init__(self, host="0.0.0.0", ports=range(1, 1024+1)): | |
self.host = host | |
self.ports = ports | |
self.open_files = 0 | |
self.file_limit = int(os.popen("ulimit -n").read()) | |
self.loop = asyncio.get_event_loop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'async/io' | |
require 'async/await' | |
require 'async/semaphore' | |
class PortScanner | |
include Async::Await | |
include Async::IO | |
def initialize(host: '127.0.0.1', ports:) | |
@host = host |