Skip to content

Instantly share code, notes, and snippets.

@m0wn1ka
m0wn1ka / mutationObserver.md
Last active May 27, 2024 10:42
this code is useful to close the popups while reading content in scalar acdemay ,this uses mutation observer to observe changes in dom

code

var targetNode = document.body
const config = { childList: true ,characterData: true, subtree: true, attributes: true,};// callback function
const callback = function (mutationsList, observer) { 
let node1 = document.getElementsByClassName("Tappable-module_root__N7ll5 absolute crt-popup_close_button__ZhQDT");
node1[0].click()
let node2=document.getElementsByClassName("exit-intent_close_icon__lxzbB")
node2[0].click()
console.log('Changes Detected');
@m0wn1ka
m0wn1ka / README.MD
Created April 18, 2024 09:46
by running this script we can see most of the useful logs for our system

main purpose(for linux users)

  • check the security of our system
  • whether there was any unauthoried accesss happended recenly

expected output

  • last login of user i.e log of recent user logins
  • log of commands ran as sudo
  • any open ports :nmap
  • recently installed sofwares (by dpkg -i or sudo apt install)
  • recently connected wifi details
  • last run 10 commands
@m0wn1ka
m0wn1ka / script.js
Created March 8, 2024 11:20
read the gist for description
/* scenario of usage
- reading a pdf of say 100 pages
- index page has numbers to each chapters
- those are not the exact numbers to by typed in toolbar
- say the book chapter 1 starts on page 19
- so index pages shows chapter1---- page1
- so we need to manually go thorugh them and check each page whether we reached the inteneded page or not
*/
/*description of inputs
- as first input we give the page number of first page
@m0wn1ka
m0wn1ka / check_version.py
Created February 28, 2024 03:15
check_version :given a package.json file we tell the latest versions and it wil be usefule for comparing the dependencies versions
'''
1: user gives a package.json file
2:script fetches the latest version
3:tells the need of updates
4:uses python urllib,csv
5:we can have a bash script as well to run it
6:it outputs a file with results.csv
'''
#check_version.py
import json
@m0wn1ka
m0wn1ka / tracker.py
Last active February 4, 2024 05:02
it is a simple tracker list written in python|we can add new tasks|add time to it |they will be saved in a csv file |helps to keep track of time and wok|just run `python tracker.py`
import time
import os
import csv
a=""" ___ __ _
/ _ \ /_ | |
_ __ ___ | | | |_ ___ __ | | | ____ _
| '_ ` _ \| | | \ \ /\ / / '_ \| | |/ / _` |
| | | | | | |_| |\ V V /| | | | | < (_| |
|_| |_| |_|\___/ \_/\_/ |_| |_|_|_|\_\__,_|"""
print(a)
FROM golang:1.20.6-alpine AS builder
RUN apk add --no-cache git gcc musl-dev
WORKDIR /katana
COPY katana/go.mod katana/go.sum .
RUN go mod download
COPY /katana .
#building of katana
RUN go build -o /bin/katana ./cmd/katana
#start making subfinder
"""
MOBSF REST API Python Requests
"""
import json
import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
SERVER = "http://127.0.0.1:8000"
@m0wn1ka
m0wn1ka / MobSF REST API Python.py
Created December 13, 2023 14:30 — forked from ajinabraham/MobSF REST API Python.py
MOBSF REST API Python Requests Example
"""
MOBSF REST API Python Requests
"""
import json
import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
SERVER = "http://127.0.0.1:8000"
FILE = 'diva-beta.apk'