Skip to content

Commit

Permalink
11.29
Browse files Browse the repository at this point in the history
  • Loading branch information
WebSafety-2tina committed Nov 29, 2023
1 parent 2aff664 commit db843fb
Show file tree
Hide file tree
Showing 15 changed files with 108 additions and 0 deletions.
12 changes: 12 additions & 0 deletions 成品/rsa_d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sympy

p = 447685307
q = 2037
e = 17

N = p * q
phi_N = (p - 1) * (q - 1)

d = sympy.mod_inverse(e, phi_N)

print("私钥D =", d)
9 changes: 9 additions & 0 deletions 成品/uese.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# i_kei
# 2021/1/10 14:02

import re

string = 'i was always Fond of visiting new scenes, and observing strange characters and manners. even when a mere chiLd i began my travels, and made mAny tours of discovery into foreiGn {parts and unknown regions of my native City, to the frequent alarm of my parents, and The emolument of the town-crier. as i grew into boyhood, i extended the range oF my obServations. my holiday afternoons were spent in rambles about tHe surrounding cOuntry. i made myself familiar With all its places famous in history or fable. i kNew every spot where a murder or robbery had been committed, or a ghost seen. i visited the neighboring villages, and added greatly to my stock of knowledge,By noting their habits and customs, and conversing with their sages and great men.}'

result = ''.join(re.findall(r'[A-Z\{\}]',string))
print(result)
9 changes: 9 additions & 0 deletions 成品/冒泡排序.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def bur_sre(arr):
n=len(arr)
for i in range(n-1):
for j in range(0,n-i-1):
if arr[j]>arr[j+1]:
arr[j],arr[j+1]=arr[j+1],arr[j]
arr=[64,34,25,12,22,11,90]
bur_sre(arr)
print('冒泡排序',arr)
11 changes: 11 additions & 0 deletions 成品/快速排序.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def quick_1(arr):
if len(arr)<=1:
return arr
else:
pivot=arr[0]
less=[x for x in arr[1:]if x<=pivot]
greater=[x for x in arr[1:]if x>pivot]
return quick_1(less)+[pivot]+quick_1(greater)
arr=[55,25,13,23,13]
sorted_arr=quick_1(arr)
print("快速排序",sorted_arr)
12 changes: 12 additions & 0 deletions 成品/换回二进制并去除后面多余的0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
with open('bits_on_wire.txt', 'r') as r:
bits = r.read()
bins = '' # 存放转换后的bins
for i in range(len(bits)):

if bits[0:2] == '10':
bins += '1'
else:
bins += '0'
bits = bits[2:]
print(bins)
print(len(bins))
Binary file added 成品/自动修复长宽高/flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions 成品/自动修复长宽高/hex.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions 成品/自动修复长宽高/hexnew.txt

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added 成品/自动修复长宽高/unhex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions 成品/选择排序.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def sel_1(arr):
n=len(arr)
for i in range(n):
min_index=1
for j in range(i+1,n):
if arr[j]<arr[min_index]:
min_index=j
arr[i],arr[min_index]=arr[min_index],arr[i]
arr=[64,25,12,22,11]
sel_1(arr)
print('选择排序',arr)
Binary file added 杂项/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions 杂项/uese.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from PIL import Image
MAX = 25
#二维码大小
pic = Image.new("RGB",(MAX, MAX))
str = """0000000001110010000000000
0000000000011110100000000
0000000001110001000000000
0000000010111100000000000
0000000010101010000000000
0000000001100010100000000
0000000010101010100000000
0000000001000001100000000
1100011101110110100011000
0001000010110010010010100
0100111101000011101110011
0011110100101011001001001
1000001001100001001101000
1111000111111011100101000
1011011111001101111110111
1000110110010010101101100
1000111100111111111110111
0000000010110001100010100
0000000010010100101010001
0000000010101010100011001
0000000000100111111110010
0000000000011001011110111
0000000001001100100100001
0000000011000011011011001
0000000011010000101110101
"""
# str为获取的01片段
i=0
for y in range (0,MAX):
for x in range (0,MAX):
if(str[i] == '1'):
pic.putpixel([x,y],(0, 0, 0))
else:
pic.putpixel([x,y],(255,255,255))
i = i+1
pic.show()
pic.save("1.png")
#由于直接预览分辨率太低,所以保存下来观看

0 comments on commit db843fb

Please sign in to comment.