Skip to content

Instantly share code, notes, and snippets.

View momenbasel's full-sized avatar
💭
👨‍💻👨‍💻

Moamen Basel momenbasel

💭
👨‍💻👨‍💻
View GitHub Profile
// init dependecies
var readline = require('readline');
var rl = readline.createInterface(process.stdin, process.stdout);
var fs = require('fs');
var personDetails = {
name : "",
sayings: []
}
@momenbasel
momenbasel / Wikinode.js
Created June 10, 2017 08:33
Send https to wiki and create HTML file with node js.
var https = require('https');
var fs = require('fs');
var options = {
hostname : "en.wikipedia.org",
port : 443,
path : "/wiki/Google",
method : "GET"
};
@momenbasel
momenbasel / callbackhell1.js
Last active September 17, 2018 04:00
A demo to demonstrate callback hell on js
const fs = require('fs');
fs.readFile('file.js', (err,data) => {
if (err) return console.error(err);
console.log(data.toString());
});
@momenbasel
momenbasel / callbackhell2.js
Last active September 17, 2018 04:07
a demo to demonstrate callback hell
<!DOCTYPE html>
<html>
<body>
<p id="clickme" onclick="clicked()"> Click me I\'m sexy </p>
<script>
// JS Code jere
function clicked() {
document.getElementById("clickme").innerHTML = "YOU CLICKED ME!";
}
</script>
<head><!--<script type="text/javascript" src="https://connect.facebook.net/en_US/sdk.js"> --></script></head>
<body>
// your platform code
<h1> my platform is amazing </h1>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'your-app-id',
autoLogAppEvents : true,
xfbml : true,
@momenbasel
momenbasel / headersPentest
Last active July 1, 2023 14:28
HTTP headers is the language that all web servers speaks, it can be golden gem for security researcher.
X-Forwarded-Host
X-Forwarded-Port
X-Forwarded-Scheme
Origin: null
Origin: [siteDomain].attacker.com
X-Frame-Options: Allow
X-Forwarded-For: 127.0.0.1
X-Client-IP: 127.0.0.1
Client-IP: 127.0.0.1
---For injecting BXSS(blind XSS) || SQLI payloads---
@momenbasel
momenbasel / know open processes
Created May 4, 2020 18:44
processMonitor.sh
#!/bin/bash
#loop by line
IFS=$'\n'
old_process=$(ps -eo command)
while true;do
new_process=$(ps -eo command)
diff <(echo "$old_process") <(echo "$new_process")
sleep 1
old_process=$new_process
done
@momenbasel
momenbasel / automateGuard.sh
Last active August 2, 2021 12:57
automate wireguard server configuration
#!/bin/bash
#scp vpn.sh root@ip:vpn.sh
#chmod 755 vpn.sh
echo "Updating and upgrading .. "
sudo apt-get update -y 2>&1 >/dev/null
sudo apt-get upgrade -y 2>&1 >/dev/null
sudo apt-get install git -y 2>&1 >/dev/null
echo "Downloading algo and other dependencies .."
git clone https://github.com/trailofbits/algo && cd algo 2>&1 >/dev/null
@momenbasel
momenbasel / settings.sh
Last active July 2, 2020 06:19
script to automate installations of packages, updates without corrupting parallels tools in kali19
#!/bin/bash
#chmod 755 settings.sh && sudo bash settings.sh
echo "apt get update ... "
sudo apt-get update
sudo apt-get install tree gobuster wpscan -y
gem install wpscan
wpscan --update
echo "initializing... "
echo "alias shortcut='nano ~/.bashrc'
alias simpleserver='python -m SimpleHTTPServer'
### Keybase proof
I hereby claim:
* I am momenbasel on github.
* I am momenbasel (https://keybase.io/momenbasel) on keybase.
* I have a public key ASDSSlAYzNrBAGr2Rxh2xaRlZXUIZ3B2aMqyoeoQIvVFoQo
To claim this, I am signing this object: