Skip to content

Instantly share code, notes, and snippets.

View picatz's full-sized avatar
Graph Theory

Kent Gruber picatz

Graph Theory
View GitHub Profile
package main
import (
"fmt"
"log"
"net/http"
)
func newProducer(products ...string) <-chan string {
results := make(chan string)
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
<!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>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
package main
import (
"context"
"fmt"
"net"
"os/exec"
"strconv"
"strings"
"sync"
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()
@picatz
picatz / async_port_scanner.rb
Last active June 7, 2018 22:34
asynchronous port scanner in ruby
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
package main
import (
"debug/pe"
"fmt"
)
func main() {
f, _ := pe.Open("sample.exe")
for _, section := range f.Sections {
package main
import (
"fmt"
"net"
"sync"
"time"
)
type TargetHost struct {
package main
import (
"fmt"
"net"
"time"
)
type TargetHost struct {
ip string