Skip to content

Instantly share code, notes, and snippets.

View sonulohani's full-sized avatar
🏠
Working from home

Sonu Lohani sonulohani

🏠
Working from home
View GitHub Profile
@sonulohani
sonulohani / remove_c_style_comments.py
Created August 19, 2020 14:19 — forked from ChunMinChang/remove_c_style_comments.py
Python: Remove C/C++ style comments #parser
#!/usr/bin/python
import re
import sys
def removeComments(text):
""" remove c-style comments.
text: blob of text with comments (can include newlines)
returns: text with comments removed
"""
pattern = r"""
@sonulohani
sonulohani / readme.md
Created August 3, 2020 14:40 — forked from kiasaki/readme.md
ubuntu: vboxdrv module signing for secureboot to load it

Since kernel version 4.4.0-20, it was enforced that unsigned kernel modules will not be allowed to run with Secure Boot enabled. Because you want to keep Secure Boot, then the next logical step is to sign those modules.

So let's try it.

Create signing keys

openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Descriptive name/"
@sonulohani
sonulohani / GoogleDorking.md
Created May 2, 2020 12:54 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"