docker build -t name .
docker run -p 8080:80 name
docker run -d -p 8080:80 name
docker exec -it [id] bash
docker ps
docker stop <id>
docker ps -a
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 string | |
import time | |
import warnings | |
from pathlib import Path | |
from random import SystemRandom | |
import requests # pip install requests | |
import requests_random_user_agent # noqa: F401 # pip install requests-random-user-agent | |
from urllib3.exceptions import InsecureRequestWarning |
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 dns.resolver # pip install dnspython | |
class SpfCheck: | |
def __init__(self, domain: str) -> None: | |
self.domain = domain | |
self.spf_record = self.get_spf_record(domain) | |
self.parsed_spf = self.get_assets(self.spf_record) | |
self.ip_address = self.enumerate_ips(self.spf_record) |
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 shutil | |
import uuid | |
import pytesseract # pip install pytesseract and https://tesseract-ocr.github.io/tessdoc/Home.html | |
import requests # pip install requests | |
from PIL import Image # pip install pillow | |
from bs4 import BeautifulSoup # pip install beautifulsoup4 | |
# Create a requests session |
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 logging | |
from collections import namedtuple | |
from chardet import UniversalDetector # pip install chardet | |
logger = logging.getLogger(__name__) | |
Guess = namedtuple("Guess", ["encoding", "confidence"]) | |
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
root@debian:~# curl -sL yabs.sh | bash | |
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## # | |
# Yet-Another-Bench-Script # | |
# v2022-08-20 # | |
# https://github.com/masonr/yet-another-bench-script # | |
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## # | |
Wed 31 Aug 2022 01:50:51 AM +03 | |
Basic System Information: |
aws ec2 describe-instances
aws ec2 describe-instances --instance-ids <instance1> <instance2>
aws ec2 describe-instances --filters Name=<instance_name>
aws ec2 start-instances --instance-ids <instance1> <instance2>
aws ec2 stop-instances --instance-ids <instance1> <instance2>
aws ec2 terminate-instances --instance-ids
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 requests | |
from requests.adapters import HTTPAdapter | |
from urllib3.util.retry import Retry | |
from random_useragent import random_useragent | |
class RequestsHelper(object): | |
"""HTTP Request helper""" | |
def __init__(self): |
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
Get-EventLog -LogName Security -after (Get-date -hour 0 -minute 0 -second 0) | Where-Object { (4624, 4778) -contains $_.EventID -and $_.Message -match 'logon type:\s+(10)\s' } | % { | |
(new-object -Type PSObject -Property @{ | |
TimeGenerated = $_.TimeGenerated | |
ClientIP = $_.Message -replace '(?smi).*Source Network Address:\s+([^\s]+)\s+.*', '$1' | |
UserName = $_.Message -replace '(?smi).*Account Name:\s+([^\s]+)\s+.*', '$1' | |
UserDomain = $_.Message -replace '(?smi).*Account Domain:\s+([^\s]+)\s+.*', '$1' | |
LogonType = $_.Message -replace '(?smi).*Logon Type:\s+([^\s]+)\s+.*', '$1' | |
}) | |
} | Sort-Object TimeGenerated -Descending | Select-Object TimeGenerated, ClientIP ` | |
, @{N = 'Username'; E = { '{0}\{1}' -f $_.UserDomain, $_.UserName } } ` |
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
/* | |
** | |
** derleme: | |
** gcc -O3 -DMAX_THREAD=8 tcnouretici.c -lpthread | |
** | |
** i7-4770k 8 thread | |
** ./a.out > /dev/null 0.02s user 0.01s system 473% cpu 0.008 total | |
** ./a.out > /dev/null 0.03s user 0.00s system 382% cpu 0.008 total | |
** ./a.out > /dev/null 0.03s user 0.00s system 484% cpu 0.007 total | |
** ./a.out > /dev/null 0.03s user 0.00s system 377% cpu 0.008 total |