Skip to content

Instantly share code, notes, and snippets.

@judotens
Last active December 29, 2015 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save judotens/7702630 to your computer and use it in GitHub Desktop.
Save judotens/7702630 to your computer and use it in GitHub Desktop.
SimSimi CLI chat
# url sniffed frm mitmproxy
# ref: http://blog.philippheckel.com/2013/07/01/how-to-use-mitmproxy-to-read-and-modify-https-traffic-of-your-phone/
import sys, urllib, urllib2, json, random
def tanya_simi(teks):
acak = str(int(random.uniform(100000,300000)))
data = {'av': 5.2, 'ft': 1.0, 'lc': 'id', 'os': 'i', 'req': teks, 'tz': "Asia/Jakarta", 'uid': acak}
url = "http://app.simsimi.com/app/aicr/request.p?" + urllib.urlencode(data)
data = urllib2.urlopen(url)
o = json.loads(data.read())
res = o['sentence_resp'].replace("simi", "gw")
return res
if __name__ == "__main__":
try: tanya = str(sys.argv[1])
except: print "python " + sys.argv[0] + " <message>"
print ">", tanya
print "-->", tanya_simi(tanya)
# chat results
$ python tanyasimi.py "haloo, kenalan dong"
> haloo, kenalan dong
--> Tidak mau, kaka jelek si
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment