Skip to content

Instantly share code, notes, and snippets.

View mzfr's full-sized avatar

Mehtab Zafar mzfr

View GitHub Profile
@mzfr
mzfr / AutoTyper.py
Created March 16, 2020 13:44
auto type all of your content
#!/usr/bin/env python3
'''This script help to automate the process of writing the
large content to places where copy paste might not work.
Ex: learning management systems which take code as an input
might not allow copy and paste, there we can use this kind of
trickery.
The only disadvantage of this is that it might fail to provide
proper indentation. So that will have to be done manually.
@mzfr
mzfr / MyApps.md
Last active April 23, 2020 09:12
List of Android apps that I use.

Apps

This is the list of apps that I use or have tried in past. Bold ones are those which I am using currently.

Notes

  • Google keep note: Like the simplicity and sync around.
  • Evernote: No good client for Linux and have too much functionality.
  • OneNote: haven't used it and might not use it.
  • journal and various other CLI based: Just didn't got that feel and didn't had a good android support.

In this game the playlist are just big even numbers. So you can actually create your own playlist. Like try some even number and see if it works for you.

Here is the list of all the playlist that I could found/generate:

  • 235098
  • 224344 - EPIC
  • 223698 - Mi lista equipo3
  • 236000
  • 236002
  • 236004

New Machine

  • Firefox

    • copy ~.mozilla/firefox/<user-id>/chrome
  • Telegram

    • Download Telegram from https://desktop.telegram.org/
    • move extracted folder to ~/.apps/
    • Dracula theme from https://draculatheme.com/telegram/
@mzfr
mzfr / Tanner-data-analysis.ipynb
Created May 31, 2020 11:16
Some sample code for analyzing data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mzfr
mzfr / bb-foxyproxy-pattern.json
Created June 26, 2020 05:07 — forked from ignis-sec/bb-foxyproxy-pattern.json
foxyproxy pattern (install Storage area explorer and import this file, foxyproxy import/export is broken)
{
"30523382": {
"className": "Proxy",
"data": {
"bypassFPForPAC": true,
"color": "#f57575",
"configUrl": "",
"credentials": "U2FsdGVkX1+tf3lvD5TBClW2UUSZAT4AWsCo/i0kU2M=",
"cycle": false,
"enabled": true,
@mzfr
mzfr / cloud_metadata.txt
Created July 30, 2020 10:48 — forked from jhaddix/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key

What data do we store?

Currently the data that is stored in redis is in 3 category::

  1. The snare data which looks like:

    Code

@mzfr
mzfr / duplicate.py
Created January 19, 2019 09:01
Find all the duplicate line of codes using AST
"""
Python code clone detector,
using Abstract Syntax Trees.
"""
import ast
import collections
class Position(ast.NodeVisitor):
lookup = [(b"SQLite", "DB"),
(b"[Content_Types].xml", "DOCX"),
(b"bin/bash", "SH"),
(b"announce36", "TORRENT"),
(b"GIF89a", "GIF"),
(b"IDA1\x00", "IDB"),
(b"\x1f\x8b\x08","GZ"),
(b'BM|\x11A', "BMP"),
(b'\xff\xd8\xff\xe0', "JPG"),
(b'!<arch>\ndebian-binary', "DEB"),