DES加密

  1. #python3
  2. import pyDes
  3. import base64
  4. # https://github.com/twhiteman/pyDes
  5. # For Python3, you'll need to use bytes, i.e.:
  6. # data = b"Please encrypt my data"
  7. # k = pyDes.des(b"DESCRYPT", pyDes.CBC, b"\0\0\0\0\0\0\0\0", pad=None, padmode=pyDes.PAD_PKCS5)
  8. data = "123456"
  9. k = pyDes.des("d@f%s^x&", pyDes.ECB, padmode=pyDes.PAD_PKCS5)
  10. d = k.encrypt(data)
  11. d = base64.b64encode(d);
  12. print(d)

字典组合排列

  1. import itertools
  2. dictory = "1234567890qwertyuiopasdfghjklzxcvbnm"
  3. def getbit(length,dictory):
  4. a = list(dictory)
  5. print(a)
  6. b = list(itertools.permutations(a, length))
  7. f = open('mima.txt', 'a')
  8. for i in b:
  9. f.write("".join(i)+'\n')
  10. f.close()
  11. length=len(dictory)
  12. for i in range(1, 6):
  13. getbit(i, dictory)

cobalt strike教程

https://blog.csdn.net/weixin_40412037/article/details/115552975
https://skewwg.github.io/2020/11/27/cobalstrike-sao-mang/