Commit 04c6cc08 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent abbb0878
...@@ -290,6 +290,10 @@ function parse(url) { ...@@ -290,6 +290,10 @@ function parse(url) {
domain: tls_domain} domain: tls_domain}
} }
function is_hex(str) {
return /^[0-9a-f]+$/.test(str)
}
function parseQuery(queryString) { function parseQuery(queryString) {
var query = {}; var query = {};
var pairs = queryString.split('&'); var pairs = queryString.split('&');
......
...@@ -3,7 +3,6 @@ let shell=require('shell-exec') ...@@ -3,7 +3,6 @@ let shell=require('shell-exec')
tesT() tesT()
async function tesT() async function tesT()
{ {
let d=await shell('head -c 16 /dev/urandom | xxd -ps') is_hex
d=d.stdout.replace('\n','')
console.log(d) console.log(d)
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment