This file contains 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
<?php | |
function connect_db($host=false, $user=false, $pass=false, $database=false, $query='SELECT 1', $throw_error=true){ | |
//defaults | |
if($host)$host='localhost'; | |
if($user)$user='root'; | |
if($pass)$pass=null; | |
$connection_object=null; | |
if($database){ | |
//connect to server, directly to database | |
$connection_object=new mysqli($hosr,$user,$password,$database); |
This file contains 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
<h1>YOU ARE ON DASHBOARD PAGE</h1> |
This file contains 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
char decToHex(int n){ | |
if(n<15||n>0){ | |
switch(n){ | |
case 10: | |
return 'a'; | |
case 11: | |
return 'b'; | |
case 12: | |
return 'c'; | |
case 13: |
This file contains 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
<canvas id="autogrf" width="600" height="600"></canvas> | |
<script> | |
var lines=[ | |
{ | |
color:"#0000ff", | |
path:[ | |
[false,53,88], | |
[false,83,88], | |
], | |
weight:1 |
This file contains 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 | |
# CHANGE MAC ADDRESS | |
# ./mac-chg.sh {interface} {new mac} | |
# ~Sarverott | |
/etc/init.d/networking stop | |
ip link set $1 address $2 | |
/etc/init.d/networking start |
This file contains 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 | |
# CREATE TOR HOST | |
# ./create-tor-host.sh {host port (np. 80)} {service address with port (np. 127.0.0.1:80)} {path to directory for service containment (np. /var/lib/tor/serv/http)} | |
# ~Sarverott | |
su | |
echo HiddenServiceDir $3 >>/etc/tor/torrc | |
echo HiddenServicePort $1 $2 >>/etc/tor/torrc | |
systermctl restart tor | |
clear |
This file contains 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
/* | |
Sett Sarverott | |
***~~~~~~~~*** | |
plt tlp crypto functions | |
*/ | |
class fibonacci{ | |
constructor(){ | |
this.last=1; | |
this.beforeLast=1; | |
} |
This file contains 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
function randomString(len=9, matrix='qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM_-.#@'){ | |
var ret=''; | |
for(var i=0;i<len;i++){ | |
ret+=matrix.charAt(Math.floor(Math.random()*matrix.length)); | |
} | |
return ret; | |
} |
This file contains 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
class DNA{ | |
constructor(mode, config){ | |
this.aminoAcidsArray=this.generateRandomDNA(config.len); | |
break; | |
} | |
generateRandomDNA(chainLength=20, allows=["A","C","G","T"]){ | |
var tmp=[]; | |
for(var i=0;i<chainLength;i++){ | |
tmp.push(allows[Math.floor(Math.random()*allows.length)]); | |
} |
This file contains 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
/* | |
USAGE: | |
*/ | |
const tcpClient=require("./tcp-client.js"); | |
var request=new tcpClient("192.168.0.1", 80); | |
request.setupConnectListener(function(){ | |
console.log('connected to server!'); | |
}); | |
request.setupDataListener(function(data){ | |
console.log(data); |
OlderNewer