Skip to content

Instantly share code, notes, and snippets.

View rchatterjee's full-sized avatar

Rahul Chatterjee rchatterjee

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rchatterjee on github.
  • I am rchatterjee (https://keybase.io/rchatterjee) on keybase.
  • I have a public key whose fingerprint is F856 9BE8 6988 1BCF 26CC 37A0 54F2 A2AD 9C63 D6C3

To claim this, I am signing this object:

@rchatterjee
rchatterjee / IPVSpyware.md
Last active June 12, 2018 19:59
Data description and request procedure for apps that can be used for intimate partner surveillance

The Spyware Used in Intimate Partner Violence

If you want to get the list of apps we found that can be used for intimate partner surveillance (IPS), please contact at (rahul@cs.cornell.edu) with your affiliation and a brief description of your purpose for obtaining the data.

app-info.db

The app-info.db contains all the app information we have crawled from Play Store and App Store, and output of our ML and manual classification. This is a sqlite database you can use sqlite3 in terminal or Sqlite Viewer type browser extension to view the datbase.

@rchatterjee
rchatterjee / SafeBrowse.php
Last active July 3, 2018 21:33
A more correct way to do safe exit buttons in IPV websites. Safe exit buttons allow users to quickly hide their browsing activity from their perpetrators by redirecting to a innocuous looking website. `window.location.replace` function works for this. Though this does not hide internal redirects --- redirect inside a domain. To hide those, the b…
<!HTML>
<head>
<script>
function exit(e) {
window.location.replace("https://www.google.com");
}
</script>
</head>
<body>
<?php
@rchatterjee
rchatterjee / .bash_aliases
Created July 12, 2019 22:14
This is my git/bash/emacs dot files. Just for educational purposes. The way to install them is putting them on `$HOME` (or `~/`) folder. WARNING: These files might have some dependencies that are not met in your machine. Use at your own risk.
# common shell commands
alias emacs="emacsclient -t" # used to be "emacs -nw"
alias semac="sudo emacsclient -t" # used to be "sudo emacs -nw"
alias emacsgui="emacsclient -c -a emacs" # new - opens the GUI with alternate non-daemon
alias em="emacs"
alias eamcs="em"
alias emac="emacs"
alias wl="wc -l"
alias la="ls -a"
@rchatterjee
rchatterjee / .bash_aliases
Last active August 5, 2020 20:06
This is my git/bash/emacs dot files. Just for educational purposes. The way to install them is putting them on `$HOME` (or `~/`) folder. I use Ubuntu OS with Emacs 24.6. WARNING: These files might have some dependencies that are not met in your machine. Use at your own risk.
# common shell commands
alias emacs="emacsclient -t" # used to be "emacs -nw"
alias semac="sudo emacsclient -t" # used to be "sudo emacs -nw"
alias emacsgui="emacsclient -c -a emacs" # new - opens the GUI with alternate non-daemon
alias em="emacs"
alias eamcs="em"
alias emac="emacs"
alias wl="wc -l"
alias la="ls -a"
@rchatterjee
rchatterjee / parallelcsv.py
Created August 5, 2020 20:10
Often I had to process a gigantic CSV files (containing hundreds of millions of lines). Despite having a powerful 32 core machine I could not use it's full power, so I created this script, it breaks the csv into chunks and easily process them in parallel.
import csv
from multiprocessing import Pool
import itertools
import mmap
import io
def approx_split_file(f, n):
"""
Does not work on gzip
Returns n seek locations which approximately split the file into
@rchatterjee
rchatterjee / ips_queies.py
Created May 14, 2022 09:23
Mobile applications are regularly used for spying on or surveilling an intimate partner. This Gist contain a list of seed queries we used for the PoPETS 2022 paper [1] to survey the prevalence of such dual-use mobile applications in 15 different languages.
# Add more terms and rerun the python-scraper script to update the tables.
AGENT = {
'en': ['boyfriend', 'girlfriend', 'wife', 'husband', 'spouse'],
'es': ['novio', 'novia', 'esposa', 'esposo', 'hombre', 'mujer'],
'fr': ['petit ami', 'petite amie', 'copain', 'copine', 'mari', 'femme', 'épouse', 'époux', 'conjoint'],
'ru': ['парень', 'подруга', 'жена', 'муж', 'супруг', 'муж'],
'it': ['ragazzo', 'ragazza', 'fidanzato', 'fidanzata', 'moglie', 'marito', 'coniuge', 'marito'],
'pt': ['namorado', 'namorada', 'esposa', 'marido', 'cônjuge', 'esposo', 'parceiro', 'parceira', 'mulher'],
'ar': ['حبيب' , 'حبيبة' , 'زوجة' , 'زوج' , 'شريك' , 'شريكة'],
'bn': ['প্রেমিক', 'প্রেমিকা', 'বন্ধু', 'বান্ধবী', 'স্ত্রী', 'স্বামী', 'পতি', 'পত্নী', 'বউ'],
@rchatterjee
rchatterjee / ips_queries.py
Last active May 16, 2022 15:17
Mobile applications are regularly used for spying on or surveilling an intimate partner. This Gist contain a list of seed queries we used for the PoPETS 2022 paper [1] to survey the prevalence of such dual-use mobile applications in 15 different languages. [1]: Almansoori et al., "A Global Survey of Android Dual-Use Applications used in Intimate…
# Add more terms and rerun the python-scraper script to update the tables.
AGENT = {
'en': ['boyfriend', 'girlfriend', 'wife', 'husband', 'spouse'],
'es': ['novio', 'novia', 'esposa', 'esposo', 'hombre', 'mujer'],
'fr': ['petit ami', 'petite amie', 'copain', 'copine', 'mari', 'femme', 'épouse', 'époux', 'conjoint'],
'ru': ['парень', 'подруга', 'жена', 'муж', 'супруг', 'муж'],
'it': ['ragazzo', 'ragazza', 'fidanzato', 'fidanzata', 'moglie', 'marito', 'coniuge', 'marito'],
'pt': ['namorado', 'namorada', 'esposa', 'marido', 'cônjuge', 'esposo', 'parceiro', 'parceira', 'mulher'],
'ar': ['حبيب' , 'حبيبة' , 'زوجة' , 'زوج' , 'شريك' , 'شريكة'],
'bn': ['প্রেমিক', 'প্রেমিকা', 'বন্ধু', 'বান্ধবী', 'স্ত্রী', 'স্বামী', 'পতি', 'পত্নী', 'বউ'],