This file contains 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 ( | |
//"net" | |
//"net/http" | |
"fmt" | |
"log" | |
//"os" | |
"flag" | |
"os/exec" |
This file contains 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
#!/bin/bash | |
# speed check url | |
url="https://httpbin.org/bytes/10240" | |
let i=0 | |
timeout=3 | |
while true | |
do | |
#ping -c 1 114.114.114.114 >/dev/null 2>&1 | |
This file contains 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 ( | |
"bytes" | |
"fmt" | |
"github.com/miekg/dns" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) |
This file contains 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
from twisted.internet import reactor, protocol | |
class EchoClient(protocol.Protocol): | |
def connectionMade(self): | |
reactor.callLater(0, self.send_data, "1111") | |
def send_data(self, data): | |
self.transport.write(data) | |
reactor.callLater(0, self.send_data, "1111") |
This file contains 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
#!python | |
""" | |
a socks server implemented by twisted | |
support socks4/4a, socks5 protocol | |
only support CONNECT command | |
# | |
""" | |
from twisted.internet.protocol import Protocol |
This file contains 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
#ifdef WIN32 | |
#include <winsock2.h> | |
#include <Ws2tcpip.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
int inet_pton4(const char *src, char *dst); | |
int inet_pton6(const char *src, char *dst); | |
int inet_pton(int af, const char *src, char *dst) |
This file contains 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" | |
"os" | |
"strconv" | |
) | |
var count int | |
func hanoi(n int, a, b, c string){ | |
if n == 1{ | |
count++ |
This file contains 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" | |
) | |
var flags = []int{1,2,3,3,2,1,1,2,3} | |
func main() { | |
var i, j, n int |
This file contains 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" | |
) | |
var maze [][]int = [][]int{ | |
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, | |
{2, 0, 0, 0, 2, 0, 0, 0, 2, 2}, | |
{2, 0, 2, 0, 2, 0, 2, 2, 0, 2}, |
This file contains 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 main() { | |
var N = 12 | |
for i := 0; i <= N; i++ { | |
for j := 0; j <= i; j++ { |