Skip to content

Instantly share code, notes, and snippets.

View mzfr's full-sized avatar

Mehtab Zafar mzfr

View GitHub Profile
@mzfr
mzfr / sessions_downloader.py
Created May 31, 2020 11:11
This script helps you download all sessions from tanner if your API is accesible from outside
"""
This is a small script that will help you download
all your data from snare tanner using tanner's API.
Always remember to deploy the API if the honeypot is
being deployed in the real world environment.
"""
import json
import requests
@mzfr
mzfr / ip2dh.py
Created May 27, 2020 06:04
Convert IP address to Decimal or hexadecimal format
"""
You can run this in the following format:
For decimal: python3 ip2dh.py D <Ip-address>
For Hexadecimal: python3 ip2dh.py H <Ip-address>
"""
#!/usr/bin/python3
import sys
if len(sys.argv) < 3:

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 / 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
@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.

Keybase proof

I hereby claim:

  • I am mzfr on github.
  • I am mzfr (https://keybase.io/mzfr) on keybase.
  • I have a public key ASDbyCVrijNl1miESe2L3_i8FQRSqwFMvxglO6HDjOHntAo

To claim this, I am signing this object:

#!/bin/bash
C_RESET='\033[0m'
C_RED='\033[1;31m'
C_GREEN='\033[1;32m'
C_YELLOW='\033[1;33m'
C_WHITE='\033[1;37m'
C_RESET_SED='\\033[0m'
C_RED_SED='\\033[1;31m'

Module A

  • Websites like techmint.com are really good resource to mostly OS like CentOS or RHEL

  • User Creation

    • adduser <username> - add new user
    • passwd <username> - change/set password for the user
  • A small intro to IDS and IPS

@mzfr
mzfr / findtraitor.py
Created June 11, 2019 13:39
Find users who unstarred your repository
"""Help you find users who unstared your repository
"""
import os
import sys
import requests_cache
import argparse
URL = "https://api.github.com/repos/{}/{}/stargazers?per_page=100&page={}"