Skip to content

Instantly share code, notes, and snippets.

View salman0ansari's full-sized avatar
🟢
$ yay -S brain

Mohd Salman salman0ansari

🟢
$ yay -S brain
View GitHub Profile
from bs4 import BeautifulSoup
import requests
url = ["https://www.imdb.com/search/title/?groups=top_250&sort=user_rating,desc&view=simple",'https://www.imdb.com/search/title/?groups=top_250&view=simple&sort=user_rating,desc&start=51&ref_=adv_nxt','https://www.imdb.com/search/title/?groups=top_250&view=simple&sort=user_rating,desc&start=101&ref_=adv_nxt','https://www.imdb.com/search/title/?groups=top_250&view=simple&sort=user_rating,desc&start=151&ref_=adv_nxt','https://www.imdb.com/search/title/?groups=top_250&view=simple&sort=user_rating,desc&start=201&ref_=adv_nxt']
for urls in url:
source = requests.get(urls).text
soup = BeautifulSoup(source, 'lxml')
for get_list in soup.find_all('div', class_='lister-item mode-simple'):
col_title = get_list.find('div', class_='col-title')
title = col_title.find("a")
from flask import Flask, jsonify
import requests
import piratebay
app = Flask(__name__)
app.url_map.strict_slashes = False
@app.route("/")
### Plugin manager
ZPLUGINDIR=$HOME/.zsh/plugins
# if you want to use unplugged, you can copy/paste plugin-clone here, or just pull the repo
if [[ ! -d $ZPLUGINDIR/zsh_unplugged ]]; then
echo "Cloning mattmc3/zsh_unplugged"
git clone https://github.com/mattmc3/zsh_unplugged $ZPLUGINDIR/zsh_unplugged --quiet
fi
source $ZPLUGINDIR/zsh_unplugged/zsh_unplugged.plugin.zsh
@salman0ansari
salman0ansari / decompile.md
Last active August 20, 2022 19:10
decompile apk
  1. Get apktool
  2. Get uber-apk-signer
  3. Create a signing certificate, this can be done inside android studio or using keytool
  4. Get your apk of choice from the internet or likewise
  5. Decompile the app using the following command, substitute the apktool version for what you downloaded.
java -jar apktool_2.6.1.jar d app.apk -r
  1. Open your text editor of choice in the new directory app and edit away, I recommend using jadx-gui for finding stuff to edit.

Ad posts

Metod 1 (Easy but broken)

Ad posts are baked in the normal post requests so to remove post ads one needs to break the parsing. To break the ad posts simply rename all occurances of "AdPost" to something else (keep the quoutation marks though), this will remove all ad posts in the main feed, but does not remove posts in the custom feeds :(

Method 2 (Blocks all post ads afaik)

@salman0ansari
salman0ansari / index.js
Created August 31, 2022 18:21
quiz poster
import csv from 'csv-parser'
import { createReadStream } from 'fs'
import axios from 'axios'
// constants
const BOT_TOKEN = "BOT TOKEN HERE"
const CHANNEL_ID = -763513 // replace it with your group id
// function to read data from csv file and return it as an array
async function getData() {
@salman0ansari
salman0ansari / .zsh_aliases
Created September 10, 2022 13:48
zsh alias
alias pacup="sudo pacman -Syu"
alias yayup="yay -Syu"
alias cleanup="yay -Scc"
alias server="ssh ubuntu@$IP -i ~/.ssh/mumbaiaws.pem"
alias printpath="echo $PWD"
# spelling correction
alias exi="exit"
alias exti="exit"
alias eitx="exit"
@salman0ansari
salman0ansari / genAuth.js
Created October 17, 2022 16:32
generate auth
const cryptoJS = require("crypto-js")
function genAuth() {
let e = (new Date).toUTCString()
, t = cryptoJS.enc.Utf8.parse((!0 ? "PaRr8".split("").reverse().join("") : "") +
function (e) {
return e ? "s7Xp?".split("").reverse().join("") : ""
}(!0) +
function (e) {
return e ? "%#5hf".split("").reverse().join("") : ""
@salman0ansari
salman0ansari / twitter-query.php
Created January 26, 2023 12:25 — forked from AzureFlow/twitter-query.php
Get last X tweets from a user.
<?php declare(strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\RequestOptions;
// ==================== //
@salman0ansari
salman0ansari / hwid.go
Created March 12, 2023 13:08
hwid generator
package main
import (
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"encoding/base64"
"encoding/pem"
"fmt"
"io/ioutil"