Advertisement
Guest User

Untitled

a guest
May 15th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. from Crypto.Hash import HMAC, MD4, MD5, SHA
  2. from Crypto.Cipher import ARC4
  3. import os
  4. import codecs
  5.  
  6. from urllib.parse import unquote_plus
  7.  
  8. from django.http import *
  9. from django.conf import settings
  10. from django.views.decorators.csrf import csrf_exempt
  11. from django.http import JsonResponse
  12.  
  13.  
  14. @csrf_exempt
  15. def FoxyCartIPNView(request):
  16.  
  17. key = settings.FOXYCART_DATAFEED_KEY
  18.  
  19. post = request.POST['FoxyData']
  20. print(post)
  21. print(unquote_plus(post))
  22.  
  23. obj1 = ARC4.new(key)
  24. data = obj1.decrypt(unquote_plus(post))
  25.  
  26. print(data)
  27.  
  28. response = JsonResponse({'status': 'done'})
  29. return response
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement