Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line and Makefile #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Python/CCcamTester.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def DoHanshake(socket):

random = bytearray(16)
socket.recv_into(random, 16) #Receive first 16 "Hello" random bytes
print "Hello bytes: " + random

random = CriptoBlock.Xor(random); #Do a Xor with "CCcam" string to the hello bytes

Expand Down
7 changes: 0 additions & 7 deletions Python/Main.py

This file was deleted.

18 changes: 18 additions & 0 deletions Python/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
all: pack

pack:
zip --quiet CCcamTester ./*.py
zip --quiet --junk-paths CCcamTester ./__main__.py
echo '#!/usr/bin/env python' > CCcamTester
cat CCcamTester.zip >> CCcamTester
rm CCcamTester.zip
chmod a+x CCcamTester

clean:
rm -f CCcamTester

install:
cp CCcamTester /usr/local/bin/

uninstall:
rm -f /usr/local/bin/CCcamTester
12 changes: 12 additions & 0 deletions Python/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Created by Dagger -- https://github.com/gavazquez

if __name__ == "__main__":
import CCcamTester
import sys

if len(sys.argv) == 5:
CCcamTester.TestCline("C: "+sys.argv[1]+" "+sys.argv[2]+" "+sys.argv[3]+" "+sys.argv[4])
else:
print "Wrong format. Try '"+sys.argv[0]+" SERVER PORT USER PASSWORD'"