]> hackdaworld.org Git - my-code/dmsd.git/commitdiff
--
authorhackbard <hackbard>
Thu, 12 Dec 2002 20:54:44 +0000 (20:54 +0000)
committerhackbard <hackbard>
Thu, 12 Dec 2002 20:54:44 +0000 (20:54 +0000)
README [new file with mode: 0644]
dmsd.c [new file with mode: 0644]
dmsd.h [new file with mode: 0644]

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..b48489d
--- /dev/null
+++ b/README
@@ -0,0 +1,5 @@
+dmsd - "digital media soft decrypt" tool
+
+author: hackbard@hackdaworld.dyndns.org
+
+have fun! :)
diff --git a/dmsd.c b/dmsd.c
new file mode 100644 (file)
index 0000000..8c29f52
--- /dev/null
+++ b/dmsd.c
@@ -0,0 +1,48 @@
+/*
+ * dmsd - digital media soft decrypt
+ * 
+ * author: hackbard@hackdaworld.dyndns.org
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "dmsd.h"
+
+int main(int argc,char *argv[]) {
+
+  /* file descriptors */
+  int v_fd,a_fd;
+  /* pid's */
+  int vpid,apid;
+  /* ip */
+  sockaddr_in dbox_addr;
+
+  if(argc!=4) {
+    printf("usage: %s <video pid> <audio pid> <dbox ip address>\n",argv[1]);
+    return -1;
+  }
+
+  sscanf(argv[2],"%x",vpid);
+  sscanf(argv[3],"%x",apid);
+  printf("using video pid %x & audio pid %x ...\n",vpid,apid);
+
+  if((v_fd=socket(AF_INET,SOCK_STREAM,0)) == -1) {
+    printf("can't open socket for video.\n");
+    return -1;
+  }
+  if((a_fd=socket(AF_INET,SOCK_STREAM,0)) == -1) {
+    printf("can't open socket for audio.\n");
+    return -1;
+  }
+
+  memset(&dbox_addr,0,sizeof(dbox_addr));
+  dbox_addr.sin_family=AF_INET;
+  target_addr.sin_port=htons(DBOX2_TS_PORT));
+  target_addr.sin_addr.s_addr=inet_addr(argv[4]);
+
+  if(connect(v_fd,(struct sockaddr *)&dbox_addr,sizeof(dbox_addr))==-1) {
+
+}
+
diff --git a/dmsd.h b/dmsd.h
new file mode 100644 (file)
index 0000000..eda770b
--- /dev/null
+++ b/dmsd.h
@@ -0,0 +1,15 @@
+/*
+ * dmsd.h - dmsd header file
+ *
+ * author: hackbard@hackdaworld.dyndns.org
+ *
+ */
+
+#ifndef DMSD_H
+#define DMSD_H
+#endif
+
+#ifdef DMSD_H
+#define DBOX2_TS_PORT 31338
+#endif
+