https://www.youtube.com/playlist?list=PLKK11Ligqitg9MOX3-0tFT1Rmh3uJp7kA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void print_number(int* somePtr) { | |
assert (somePtr!=NULL); | |
printf ("%d\n",*somePtr); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void print_number(int* somePtr) { | |
if (somePtr != NULL) | |
printf ("%d\n",*somePtr); | |
// else do something | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_permission(super_user): | |
try: | |
assert(super_user) | |
print("\nYou are a super user\n") | |
except AssertionError: | |
print(f"\nNot a Super User!!!\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
using namespace std; | |
int yob; | |
cout << "Enter You Year Of Birth: "; | |
cin>>yob; | |
assert(2021-yob>18); | |
cout<<"You May Proceed"; | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tls = require("tls"); | |
const fs = require("fs"); | |
let server = tls.createServer({ | |
ca: fs.readFileSync("./ca.crt"), | |
cert: fs.readFileSync("./server.crt"), | |
key: fs.readFileSync("./server.key"), | |
requestCert: true, | |
rejectUnauthorized: true | |
}, (socket) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node[56864]: ../src/node_crypto.cc:1965:Local<v8::Object> node::crypto::X509ToObject(node::Environment *, X509 *): Assertion `(1) == (X509V3_EXT_print(bio.get(), ext, 0, 0))' failed. | |
1: 0x10007c74a node::Abort() [/Users/findutnyy/.node/12.11.0/bin/node] | |
2: 0x10007c4f6 node::AppendExceptionLine(node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Message>, node::ErrorHandlingMode) [/Users/findutnyy/.node/12.11.0/bin/node] | |
3: 0x100144db9 node::crypto::X509ToObject(node::Environment*, x509_st*) [/Users/findutnyy/.node/12.11.0/bin/node] | |
4: 0x10013df92 node::crypto::SSLWrap<node::TLSWrap>::GetPeerCertificate(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/findutnyy/.node/12.11.0/bin/node] | |
5: 0x1001db0c8 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/Users/findutnyy/.node/12.11.0/bin/node] | |
6: 0x1001da689 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//bad code | |
if (!SafeX509ExtPrint(bio.get(), ext)) { | |
CHECK_EQ(1, X509V3_EXT_print(bio.get(), | |
//good code | |
if (!SafeX509ExtPrint(bio.get(), ext) && | |
X509V3_EXT_print(bio.get(), ext, 0, 0) != 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$flag="Take_the_Flag"; | |
$flag2=NULL; | |
$t="die($flag)"; | |
assert("$t == $flag2") or die("Dying...!!!!!"); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<head><meta charset="utf-8"></head> | |
<button type='button' onclick='cors()'>CORS</button> | |
<p id='demo'></p> | |
<script> | |
function cors() { | |
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if (this.readyState == 4 && (this.status == 200 || this.status ==400)) { |
OlderNewer