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
#!/usr/bin/env bash | |
pipe_loc="/tmp/telnet1" | |
if [ ! -p $pipe_loc ]; then | |
mkfifo $pipe_loc | |
fi | |
tail -f $pipe_loc | telnet 10.0.0.3 23 & | |
PID1=$! |
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
var links = document.getElementsByTagName("a"); | |
document.head.insertAdjacentHTML("beforeend", `<style>@keyframes intraT { 50% { opacity: 0; }}</style>`) | |
for (var i = 0; i < links.length; i++) { | |
let temp_url = "" | |
try { | |
temp_url = new URL(links[i].href); | |
} catch(err) { | |
temp_url = "err" | |
} | |
if (temp_url != "err") { |
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
#!/bin/bash | |
#### | |
# ahmetozer.org | |
#### | |
## Usage | |
# ./udp_test_package_loop.sh (send-interval) (remote-ip) (remote-port|default 53) (source-port|default 9000) | |
function fakeReq { |
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
#!/bin/bash | |
# Mesh Topology with Namespace | |
# Graph | |
NAMESPACE_COUNT=3 | |
### | |
# ! I recommend to run this script in temporary container. | |
# docker run -it --rm --privileged ahmetozer/cna | |
# in container curl https://gist.githubusercontent.com/ahmetozer/d01538327a98ed70cf04e48e89fe8c31/raw/mesh-topology-example.sh -o mesh-topology-example.sh ; chmod +x mesh-topology-example.sh | |
### |
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
String.prototype.inikv = function (regxy) { | |
const myRegexp = RegExp("^(?:"+regxy+")=(.*)$","gm"); | |
let match = myRegexp.exec(this); | |
if (match != null) { | |
return match[1] | |
} | |
return null | |
} |
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
apt autoremove --purge | |
apt clean | |
find /var/lib/apt/lists/ -maxdepth 1 -type f -print0 | xargs -0 rm |
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
FROM debian:latest as dapt | |
RUN apt update | |
FROM dapt as dockerclient | |
RUN apt install docker.io -y | |
FROM dapt as vscode | |
RUN apt install curl net-tools bash-completion -y && \ | |
curl -fsSL https://code-server.dev/install.sh | sh ;\ | |
apt autoremove --purge -y;\ |
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
http { | |
server { | |
listen 80; | |
listen [::]:80 | |
server_name example.com; | |
location / { | |
proxy_pass https://127.0.0.1; | |
proxy_ssl_server_name on; | |
proxy_ssl_name example.local; |
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
#!/bin/sh | |
# Update time and date from cloudflare with curl and date commands. | |
# It is easy to use ntp is not installed servers. | |
# You can execute for one time update or execute with service arg to update every 600 second. | |
function updateDate { | |
date -s"@$(curl ahmetozer.org/cdn-cgi/tracert -s | grep ts= | cut -d"=" -f2 | cut -d"." -f1)" | |
if [ "$?" == "0" ] | |
then | |
updated="true" |
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 ( | |
"io" | |
"log" | |
"net" | |
"os" | |
) | |
func forward(conn net.Conn) { |