Skip to content

Instantly share code, notes, and snippets.

View sk0x1234's full-sized avatar
🎯
Focusing

Srinath koilakonda sk0x1234

🎯
Focusing
  • newyork
View GitHub Profile
import requests
import pathlib
with open("files.txt","r") as f:
urls = [ url.rstrip() for url in f.readlines()]
files_to_download = []
@sk0x1234
sk0x1234 / v1.sh
Created June 12, 2023 04:13 — forked from ZhDev/v1.sh
Get public IP address from command line
curl ifconfig.me
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
.php
.html
.txt
.htm
.aspx
.asp
.js
.css
.pgsql.txt
.mysql.txt
# add filenames to a file
$ while read -r line ;do find / -type f -name $line -ls 2>/dev/null ; done < ./filenames.txt
#ip address
$ while read -r line ;do find / -type f -name $line -exec grep -l -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" {} \; 2>/dev/null ; done < ./filenames.txt
#sha1sum
$ while read -r line ;do find / -type f -name $line -exec sh -c "ls -l {} ;cat {} | sha1sum" \; 2>/dev/null ; done < ./filenames.txt
@sk0x1234
sk0x1234 / Base64 decode recursive python
Created March 27, 2023 20:19
THM- intro to python challenge
#save encode.txt in a file
import base64
s = open("encode.txt","r")
s = s.read() # read as strings check type(s)
for i in range(5):
s = base64.b16decode(s)
@sk0x1234
sk0x1234 / nmap_examples.md
Created April 27, 2021 00:06 — forked from rsperl/nmap_examples.md
nmap examples
USE this
https://github.com/aws/aws-cli/issues/1079#issuecomment-541997810
Hello Folks! aws
I installed aws cli from pip3 --user
I couldn't find Completion for Fish shell in aws cli web page
@sk0x1234
sk0x1234 / tcp-service-reply.py
Created May 23, 2020 16:28
247CTF unknown service 1.0
import socket,re
with socket.socket(socket.AF_INET,socket.SOCK_STREAM) as s:
s.connect((host,dport))
while( i < 500):
res = str(s.recv(1024).decode())
print(res)
try:
item = re.findall('\d+ \+ \d+',res)[0]
buf = str(eval(item))+ '\r\n'
@sk0x1234
sk0x1234 / ssl-check.py
Created March 26, 2020 20:14 — forked from gdamjan/ssl-check.py
Python script to check on SSL certificates
# -*- encoding: utf-8 -*-
# requires a recent enough python with idna support in socket
# pyopenssl, cryptography and idna
from OpenSSL import SSL
from cryptography import x509
from cryptography.x509.oid import NameOID
import idna
from socket import socket