全国大学生信息安全竞赛安徽省赛-初赛WP

高职组

​CRYPTO​

md5爆破MISC​

import hashlib
for m in range(1,13):
    for d in range(1,33):
        hash1 = hashlib.md5()
        t='1997'+str(m).zfill(2)+str(d).zfill(2)
        hash1.update(t.encode("utf-8"))
        md5=hash1.hexdigest()
        if md5[:16]=='0175501585710a89':
            print(t)

​flag{19970727}

MISC​

from PIL import Image

f = open("./basic.txt","r")
result = f.readlines()
for i in result:
   d = i.strip("\n")

x = 900
y = 150
im = Image.new("RGB",(y,x))
file = open("./basic.txt","r")
for i in range(y):
   for j in range(x):
      line = file.readline()
      rgb = line.split(",")
      im.putpixel((i,j),(int(rgb[0].strip("(")),int(rgb[1]),int(rgb[2].strip("\n").strip(")"))))
im.show()
im.save("./flag.jpg")

flag{RGB_1s_e4sY}

reverser​

#include
int main()
{
    int a[14]={0x68,0x57,0x19,0x48,0x50,0x6e,0x58,0x78,0x54,0x6a,0x19,0x58,0x5e,0x06};
    int i;
    for(i=0;i<14;i++)
    {
        a[i]=a[i]-5;
        a[i]=a[i]^0x20;
        printf("%c",a[i]);
    }
    return 0;
}

flag{Cr4ckIsSoE4sy!}​

本科组​

crypto​

共享素数-N不互素

e = 65537
c1 = 4941707047346667175208995859949404389322583225976420544331062614693386809791615029343678778664425048376340187366155043564992194252492261601744888865226804666848581371609771137227420031942968451977653728169798389786353613232575562480592642357804748184143027923004426192328699886075682903734608470957863437094162637828629980861061313193478602945671274941820713441068765686829372743052820131555406957764726286667754643454059540313131391568239032095090368445897408669444308899803560012425357607296170299089198157608947328661673814435023280124404645125994375763555334414315256063016251526584818376451642455251523209255802
n1 = 23870161680183523079741569974844567326019753076392636009584986567612198552769297327520140947753967201209251923569250042808435602604746173316812218561002639890627852637259978806388826042450311742551247657942180612619269580501221658861246087292389488686348455622638650573340684120087995899502358420625262078225393838288965001923426876996521245801399902175648882304659224530399947903626889562357334105116376279410129681393098230440046021549860624097368418577529956483763264706086840482433245189236097197915840133182908767740904012654564998517212402393117912683093507460179360440863741119755955402495890705201911376608287
c2 = 15361482578239201122825735518613560425956918915682082355755400248771835488441342237398430042762133757967330714360779296866589247720714355380496678719262004338885321961470744042111217118574883401901820510469999875432217721036106005542885036119619624821458268716392152006782899996387626674519404398439643754050298394226768471302131781460214161254895195587947346312072521081253756073686949674898685783707405534113832058397514942338528976019855060111031531673705000954520440402528450353772060433440812396824325761264326895396370502262440389779595049703594280011852963627217339075366282031362737198717406376555679069806258
n2 =  27799578924743649991986024628153641945800733904267409387203138015966552861634251919848520890705796293509399305155356061091874177186618542710179261647491030477309736237809439680701450990170747064756974278248222130804744789442182601317629449781655995599376757972019189878891496801811940270932663639537402645346568086063480094758375696668553141406635142266030261394906382884967081494979457009425568148790959718481235323099812941999183305133433926721515800515742432246719644508578309303020326602709313629970737948300830614693840686955065188058995026232804383907013878621481775642198847855961249614692528029044092622003431

p=GCD(n1,n2) 
q1=n1//p 
q2=n2//p 
e=0x10001 
a=crt([c1,c2],[n1,n2]) 
d=inverse_mod(e,(p-1)*(q1-1)*(q2-1)) 
m=pow(int(a),d,p*q1*q2) 
print(m)
nb=int(m).bit_length()//8+1 
print(int(m).to_bytes(nb,'big'))

b'flag{c019c5f3-4441-e278-822e-ddc4f81f2f3a}'​

misc​

hex-base32套娃

REVERSE​ 

原题:https://blog.csdn.net/baikeng3674/article/details/102125209​

 
public class test {
    //static String arr1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";  
    //static String arr2 = "ZYXWVUTSRQPONMLKJIHGFEDCBA";
    public static void main(String args[]){
        String arr1 = "JsnatterrtJuaththovacke";
      for(int i=0;i<19;i++){
          if(i==4||i==9||i==14||i==19){
              System.out.print('-');
          }else{
              System.out.print(arr1.charAt(check(i,arr1)));
          }
      }
    }
    public static int check(int i,String arg){
        return te(i)%arg.length();
    }
    public static int te(int i){
        if(i>2){
            return te(i-1)+te(i-2);
        }
        return 1;
    }
}
##flag{sssn-trtk-tcea-akJr}

你可能感兴趣的:(网络安全)