Skip to content

Instantly share code, notes, and snippets.

@aligalehban
aligalehban / wifipass.py
Last active January 13, 2022 21:53
Extract saved WIFI passwords with python
import subprocess
data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8', errors="backslashreplace").split('\n')
profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]
for i in profiles:
try:
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8', errors="backslashreplace").split('\n')
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
try:
print ("{:<30}| {:<}".format(i, results[0]))
@aligalehban
aligalehban / walletbalance.py
Created November 7, 2021 20:46
Telegram bot to check ETH , XRP, Doge wallet Balance
#developer Ali Ghalehban
import telebot
from telebot.types import Message
import json
import requests
import re
usdprice=1
@aligalehban
aligalehban / img2txtbot.py
Created November 7, 2021 20:43
Telegram Robot to extract Text from image
from sys import path
from telegram.ext import *
import telegram
import PIL
from PIL import Image
import pytesseract
def start_command(update, context):
name = update.message.chat.first_name
@aligalehban
aligalehban / sepratestring.cpp
Created June 27, 2018 05:41
separate alphabet, digit,space in string in c++ source code - www.alighalehban.com
#include <iostream>
using namespace std;
int main()
{
char line[150];
int vowels, consonants, digits, spaces;
vowels = consonants = digits = spaces = 0;
@aligalehban
aligalehban / stringfilter.cpp
Created June 27, 2018 05:22
Remove all characters except alphabets in c++ source code - www.alighalehban.com
#include <iostream>
using namespace std;
int main() {
string line;
cout << "Enter a string: ";
getline(cin, line);
for(int i = 0; i < line.size(); ++i)
{
@aligalehban
aligalehban / strlength.cpp
Created June 27, 2018 05:19
Length of String in c++ source code - www.alighalehban.com
#include <iostream>
using namespace std;
int main()
{
string str = "C++ Programming";
// you can also use str.length()
cout << "String Length = " << str.size();
@aligalehban
aligalehban / bin<>oct.cpp
Created June 21, 2018 04:29
Convert Binary Number to Octal and vice-versa in c++ source code - www.alighalehban.com
#include <iostream>
#include <cmath>
using namespace std;
int convertBinarytoOctal(long long);
int main()
{
long long binaryNumber;
@aligalehban
aligalehban / oct2dec.cpp
Created June 21, 2018 04:29
convert octal to decimal in c++ source code - www.alighalehban.com
#include <iostream>
#include <cmath>
using namespace std;
int octalToDecimal(int octalNumber);
int main()
{
int octalNumber;
cout << "Enter an octal number: ";
@aligalehban
aligalehban / bin2dec.cpp
Created June 21, 2018 04:28
convert binary to decimal in c++ source code - www.alighalehban.com
#include <iostream>
#include <cmath>
using namespace std;
int convertBinaryToDecimal(long long);
int main()
{
long long n;