curl 、饼干和ctf

gtlvzcf8  于 2022-11-13  发布在  其他
关注(0)|答案(1)|浏览(191)

我有一个简单的问题。我必须在这个网站上发送100个cookie,但我不知道如何自动完成。也许我可以用100个cookie创建json或txt并发送它们。以及如何创建这些cookie。这是网站地址:http://kslweb1.spb.ctf.su/first/level7/

x4shl7ld

x4shl7ld1#

"卷发"

curl http://kslweb1.spb.ctf.su/first/level7  -H 'cookie: key0:value0; key1:value1; key2:value2; key3:value3; key4:value4; key5:value5; key6:value6; key7:value7; key8:value8; key9:value9; key10:value10; key11:value11; key12:value12; key13:value13; key14:value14; key15:value15; key16:value16; key17:value17; key18:value18; key19:value19; key20:value20; key21:value21; key22:value22; key23:value23; key24:value24; key25:value25; key26:value26; key27:value27; key28:value28; key29:value29; key30:value30; key31:value31; key32:value32; key33:value33; key34:value34; key35:value35; key36:value36; key37:value37; key38:value38; key39:value39; key40:value40; key41:value41; key42:value42; key43:value43; key44:value44; key45:value45; key46:value46; key47:value47; key48:value48; key49:value49; key50:value50; key51:value51; key52:value52; key53:value53; key54:value54; key55:value55; key56:value56; key57:value57; key58:value58; key59:value59; key60:value60; key61:value61; key62:value62; key63:value63; key64:value64; key65:value65; key66:value66; key67:value67; key68:value68; key69:value69; key70:value70; key71:value71; key72:value72; key73:value73; key74:value74; key75:value75; key76:value76; key77:value77; key78:value78; key79:value79; key80:value80; key81:value81; key82:value82; key83:value83; key84:value84; key85:value85; key86:value86; key87:value87; key88:value88; key89:value89; key90:value90; key91:value91; key92:value92; key93:value93; key94:value94; key95:value95; key96:value96; key97:value97; key98:value98; key99:value99; key100:value100;'

**在JavaScript中 curl **

fetch('http://kslweb1.spb.ctf.su/first/level7', {
headers: {
    'cookie': 'key0:value0; key1:value1; key2:value2; key3:value3; key4:value4; key5:value5; key6:value6; key7:value7; key8:value8; key9:value9; key10:value10; key11:value11; key12:value12; key13:value13; key14:value14; key15:value15; key16:value16; key17:value17; key18:value18; key19:value19; key20:value20; key21:value21; key22:value22; key23:value23; key24:value24; key25:value25; key26:value26; key27:value27; key28:value28; key29:value29; key30:value30; key31:value31; key32:value32; key33:value33; key34:value34; key35:value35; key36:value36; key37:value37; key38:value38; key39:value39; key40:value40; key41:value41; key42:value42; key43:value43; key44:value44; key45:value45; key46:value46; key47:value47; key48:value48; key49:value49; key50:value50; key51:value51; key52:value52; key53:value53; key54:value54; key55:value55; key56:value56; key57:value57; key58:value58; key59:value59; key60:value60; key61:value61; key62:value62; key63:value63; key64:value64; key65:value65; key66:value66; key67:value67; key68:value68; key69:value69; key70:value70; key71:value71; key72:value72; key73:value73; key74:value74; key75:value75; key76:value76; key77:value77; key78:value78; key79:value79; key80:value80; key81:value81; key82:value82; key83:value83; key84:value84; key85:value85; key86:value86; key87:value87; key88:value88; key89:value89; key90:value90; key91:value91; key92:value92; key93:value93; key94:value94; key95:value95; key96:value96; key97:value97; key98:value98; key99:value99; key100:value100;'
}

});

**PHP中的 curl **

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://kslweb1.spb.ctf.su/first/level7');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
]);
curl_setopt($ch, CURLOPT_COOKIE, 'key0:value0; key1:value1; key2:value2; key3:value3; key4:value4; key5:value5; key6:value6; key7:value7; key8:value8; key9:value9; key10:value10; key11:value11; key12:value12; key13:value13; key14:value14; key15:value15; key16:value16; key17:value17; key18:value18; key19:value19; key20:value20; key21:value21; key22:value22; key23:value23; key24:value24; key25:value25; key26:value26; key27:value27; key28:value28; key29:value29; key30:value30; key31:value31; key32:value32; key33:value33; key34:value34; key35:value35; key36:value36; key37:value37; key38:value38; key39:value39; key40:value40; key41:value41; key42:value42; key43:value43; key44:value44; key45:value45; key46:value46; key47:value47; key48:value48; key49:value49; key50:value50; key51:value51; key52:value52; key53:value53; key54:value54; key55:value55; key56:value56; key57:value57; key58:value58; key59:value59; key60:value60; key61:value61; key62:value62; key63:value63; key64:value64; key65:value65; key66:value66; key67:value67; key68:value68; key69:value69; key70:value70; key71:value71; key72:value72; key73:value73; key74:value74; key75:value75; key76:value76; key77:value77; key78:value78; key79:value79; key80:value80; key81:value81; key82:value82; key83:value83; key84:value84; key85:value85; key86:value86; key87:value87; key88:value88; key89:value89; key90:value90; key91:value91; key92:value92; key93:value93; key94:value94; key95:value95; key96:value96; key97:value97; key98:value98; key99:value99; key100:value100;');

$response = curl_exec($ch);

curl_close($ch);

在JSON中

{
    "url": "http://kslweb1.spb.ctf.su/first/level7",
    "raw_url": "http://kslweb1.spb.ctf.su/first/level7",
    "method": "get",
    "headers": {
        "cookie": "key0:value0; key1:value1; key2:value2; key3:value3; key4:value4; key5:value5; key6:value6; key7:value7; key8:value8; key9:value9; key10:value10; key11:value11; key12:value12; key13:value13; key14:value14; key15:value15; key16:value16; key17:value17; key18:value18; key19:value19; key20:value20; key21:value21; key22:value22; key23:value23; key24:value24; key25:value25; key26:value26; key27:value27; key28:value28; key29:value29; key30:value30; key31:value31; key32:value32; key33:value33; key34:value34; key35:value35; key36:value36; key37:value37; key38:value38; key39:value39; key40:value40; key41:value41; key42:value42; key43:value43; key44:value44; key45:value45; key46:value46; key47:value47; key48:value48; key49:value49; key50:value50; key51:value51; key52:value52; key53:value53; key54:value54; key55:value55; key56:value56; key57:value57; key58:value58; key59:value59; key60:value60; key61:value61; key62:value62; key63:value63; key64:value64; key65:value65; key66:value66; key67:value67; key68:value68; key69:value69; key70:value70; key71:value71; key72:value72; key73:value73; key74:value74; key75:value75; key76:value76; key77:value77; key78:value78; key79:value79; key80:value80; key81:value81; key82:value82; key83:value83; key84:value84; key85:value85; key86:value86; key87:value87; key88:value88; key89:value89; key90:value90; key91:value91; key92:value92; key93:value93; key94:value94; key95:value95; key96:value96; key97:value97; key98:value98; key99:value99; key100:value100;"
    }
}

带标志的响应

Done! Flag: KSL{d5a0bc3afdc571bab78da4f96c9965b5}

相关问题