• 南邮平台 骚年要来一发吗


    知识点:PHP函数      1.strrev():反转字符串

    2.str_rot13() 函数对字符串执行 ROT13 编码。类似于凯撒加密

    ROT13 编码把每一个字母在字母表中向前移动 13 个字母。数字和非字母字符保持不变。

    提示:编码和解码都是由相同的函数完成的。如果您把已编码的字符串作为参数,那么将返回原始字符串。

     3.python中字符串反转https://www.cnblogs.com/jasmine0627/p/9510296.html

    解密代码python

    # -*- coding: utf-8 -*-
    import base64
    
    cipher1='iEJqak3pjIaZ0NzLiITLwWTqzqGAtW2oyOTq1A3pzqas'
    cipher=''
    #rot13
    for element in cipher1:
        if 'a' <= element <= 'z':
            cipher+=chr(ord('a') + ((ord(element) - ord('a'))-13)%26)
        elif 'A' <= element <= 'Z':
            cipher+=chr(ord('A') + ((ord(element) - ord('A'))-13)%26)
        else:
            cipher+=element
    		
    #strrev 字符串切片法
    cipher=cipher[::-1]
    
    #b64decode
    cipher=base64.b64decode(cipher)
    
    mes = ''
    #cipher[i]-1每个元素减一
    for element in cipher:
    	mes+=chr(element-1)
    	
    #strrev 2
    mes=mes[::-1]
    
    print(mes)
    

      

  • 相关阅读:
    linux会话浅析
    linux memory lock浅析
    浅谈动态库符号的私有化与全局化
    LINUX内核内存屏障
    linux内存屏障浅析
    linux内核mem_cgroup浅析
    记一个linux内核内存提权问题
    linux内核cfs浅析
    linux内核tmpfs/shmem浅析
    linux IPv4报文处理浅析
  • 原文地址:https://www.cnblogs.com/liqik/p/10662150.html
Copyright © 2020-2023  润新知