Skip to content
Snippets Groups Projects
Commit 70caf4a2 authored by ismcarb's avatar ismcarb
Browse files

Seguridad comleta (se supone)

parent d5ab7c02
Branches
No related tags found
No related merge requests found
Showing
with 65 additions and 93 deletions
......@@ -7,10 +7,7 @@
<list default="true" id="0c5e7f40-d6e0-4cdf-8175-c288dac24af5" name="Changes" comment="nombres de hosts">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mp3files/destination/AmigaMia.mp3" beforeDir="false" afterPath="$PROJECT_DIR$/mp3files/destination/AmigaMia.mp3" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/spotify/media/Globals.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/spotify/media/Globals.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/spotify/rmi/client/stream/unit/ContinuousReadL.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/spotify/rmi/client/stream/unit/ContinuousReadL.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/spotify/rmi/server/Launcher.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/spotify/rmi/server/Launcher.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/spotify/rmi/server/SpotifyServerImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/spotify/rmi/server/SpotifyServerImpl.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -41,46 +38,43 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;Application.Client.executor&quot;: &quot;Run&quot;,
&quot;Application.ContinuousReadL.executor&quot;: &quot;Run&quot;,
&quot;Application.ContinuousReadLSeguro.executor&quot;: &quot;Run&quot;,
&quot;Application.Launcher.executor&quot;: &quot;Run&quot;,
&quot;Application.LauncherSeguro.executor&quot;: &quot;Run&quot;,
&quot;Application.PlayList.executor&quot;: &quot;Run&quot;,
&quot;Application.PlayRandomSong.executor&quot;: &quot;Run&quot;,
&quot;Application.PlaySong.executor&quot;: &quot;Run&quot;,
&quot;Application.PrimerasOperaciones.executor&quot;: &quot;Run&quot;,
&quot;Application.SegundasOperaciones.executor&quot;: &quot;Run&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;/home/adrian/IdeaProjects/practicasdis2/out/production/practicasdis2/spotify/rmi/server&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.lookFeel&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Application.Client.executor": "Run",
"Application.ContinuousReadL.executor": "Run",
"Application.Launcher.executor": "Run",
"Application.PlayList.executor": "Run",
"Application.PlayRandomSong.executor": "Run",
"Application.PlaySong.executor": "Run",
"Application.PrimerasOperaciones.executor": "Run",
"Application.SegundasOperaciones.executor": "Run",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"git-widget-placeholder": "master",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "/home/ismael/IdeaProjects/practicasdis2/src/spotify/media",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Modules",
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.0",
"settings.editor.selected.configurable": "preferences.lookFeel",
"vue.rearranger.settings.migration": "true"
}
}</component>
}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/out/production/practicasdis2/spotify/rmi/server" />
<recent name="$PROJECT_DIR$/src/spotify/media" />
<recent name="$PROJECT_DIR$/src/spotify/rmi/client/stream/unit" />
<recent name="$PROJECT_DIR$/src/spotify" />
<recent name="$PROJECT_DIR$/src/sdis/spotify/client/unit" />
<recent name="$PROJECT_DIR$/src/sdis/spotify/client" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/out/production/practicasdis2/spotify/rmi/server" />
<recent name="$PROJECT_DIR$/covers" />
<recent name="$PROJECT_DIR$/mp3files/origin" />
</key>
......@@ -91,51 +85,10 @@
<recent name="sdis.utils" />
</key>
</component>
<component name="RunManager" selected="Application.ContinuousReadLSeguro">
<configuration name="ContinuousReadLSeguro" type="Application" factoryName="Application" temporary="true">
<option name="MAIN_CLASS_NAME" value="spotify.rmi.client.stream.unit.ContinuousReadL" />
<module name="practicasdis2" />
<option name="PROGRAM_PARAMETERS" value="-Djavax.net.ssl.trustStore=Client_Truststore.p12 -Djavax.net.ssl.trustStorePassword=clientepass -Dfile.encoding=UTF-8" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="spotify.rmi.client.stream.unit.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="LauncherSeguro" type="Application" factoryName="Application" temporary="true">
<option name="MAIN_CLASS_NAME" value="spotify.rmi.server.Launcher" />
<module name="practicasdis2" />
<option name="PROGRAM_PARAMETERS" value="-Djavax.net.ssl.keyStore=Server_Keystore.p12 \ -Djavax.net.ssl.keyStorePassword=servidorpass \ -Dfile.encoding=UTF-8 " />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="spotify.rmi.server.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.ContinuousReadLSeguro" />
<item itemvalue="Application.LauncherSeguro" />
</list>
<recent_temporary>
<list>
<item itemvalue="Application.ContinuousReadLSeguro" />
<item itemvalue="Application.LauncherSeguro" />
</list>
</recent_temporary>
</component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-jdk-9f38398b9061-39b83d9b5494-intellij.indexing.shared.core-IU-241.15989.150" />
<option value="bundled-js-predefined-1d06a55b98c1-91d5c284f522-JavaScript-IU-241.15989.150" />
<option value="jdk-11.0.22-corretto-11.0.22-4caba194b151-bfa3237e" />
</set>
</attachedChunks>
</component>
......@@ -157,8 +110,6 @@
<workItem from="1716309405427" duration="3744000" />
<workItem from="1716376204050" duration="3565000" />
<workItem from="1716384955891" duration="7363000" />
<workItem from="1716395037453" duration="4774000" />
<workItem from="1716400743091" duration="445000" />
</task>
<task id="LOCAL-00001" summary="l">
<option name="closed" value="true" />
......
File added
File added
File added
File mode changed from 100644 to 100755
......@@ -23,8 +23,8 @@ public class Globals {
public static String log_stream = " [STREAM] Streaming to: ";
public static String log_stream_end = " [STREAM] Stream finished. Tx Bytes: ";
// Streaming paths
public static String server_host = "localhost";
public static String client_host = "localhost";
public static String server_host = "localHost";
public static String client_host = "localHost";
public static int server_port = 20099;
public static String path_origin = "./mp3files/origin/";
public static String path_destination = "./mp3files/destination/";
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File deleted
......@@ -8,7 +8,6 @@ import java.util.ArrayList;
import java.util.Scanner;
import spotify.media.Media;
import spotify.rmi.common.SpotifyServer;
public class ContinuousReadL {
public static void main(String [ ] args) {
......@@ -19,9 +18,10 @@ public class ContinuousReadL {
try {
javax.rmi.ssl.SslRMIClientSocketFactory rmicsf = new javax.rmi.ssl.SslRMIClientSocketFactory();
java.rmi.registry.Registry reg = java.rmi.registry.LocateRegistry.getRegistry(Globals.server_host, 1099, rmicsf);
java.rmi.registry.Registry reg =
java.rmi.registry.LocateRegistry.getRegistry(Globals.server_host, 1099,
rmicsf);
Spotify or = (Spotify) reg.lookup(Globals.remote_name);
//Spotify or = (Spotify) Naming.lookup("rmi://"+Globals.server_host+"/"+Globals.remote_name);
System.out.println(or.hello());
......
......@@ -17,8 +17,12 @@ public class PlayList {
System.setProperty("java.rmi.server.hostname",Globals.client_host);
try {
SpotifyServer orServer = (SpotifyServer) Naming.lookup("rmi://"+ Globals.server_host+"/"+Globals.remote_name);
Spotify or = (Spotify) Naming.lookup("rmi://"+Globals.server_host+"/"+Globals.remote_name);
javax.rmi.ssl.SslRMIClientSocketFactory rmicsf = new javax.rmi.ssl.SslRMIClientSocketFactory();
java.rmi.registry.Registry reg =
java.rmi.registry.LocateRegistry.getRegistry(Globals.server_host, 1099,
rmicsf);
Spotify or = (Spotify) reg.lookup(Globals.remote_name);
SpotifyServer orServer = (SpotifyServer) reg.lookup(Globals.remote_name);
System.out.println(or.hello());
......
......@@ -14,8 +14,12 @@ public class PlayRandomSong {
System.setProperty("java.rmi.server.hostname",Globals.client_host);
try {
SpotifyServer orServer = (SpotifyServer) Naming.lookup("rmi://"+ Globals.server_host+"/"+Globals.remote_name);
Spotify or = (Spotify) Naming.lookup("rmi://"+Globals.server_host+"/"+Globals.remote_name);
javax.rmi.ssl.SslRMIClientSocketFactory rmicsf = new javax.rmi.ssl.SslRMIClientSocketFactory();
java.rmi.registry.Registry reg =
java.rmi.registry.LocateRegistry.getRegistry(Globals.server_host, 1099,
rmicsf);
Spotify or = (Spotify) reg.lookup(Globals.remote_name);
SpotifyServer orServer = (SpotifyServer) reg.lookup(Globals.remote_name);
System.out.println(or.hello());
......
......@@ -15,8 +15,12 @@ public class PlaySong {
System.setProperty("java.rmi.server.hostname",Globals.client_host);
try {
SpotifyServer orServer = (SpotifyServer) Naming.lookup("rmi://"+ Globals.server_host+"/"+Globals.remote_name);
Spotify or = (Spotify) Naming.lookup("rmi://"+Globals.server_host+"/"+Globals.remote_name);
javax.rmi.ssl.SslRMIClientSocketFactory rmicsf = new javax.rmi.ssl.SslRMIClientSocketFactory();
java.rmi.registry.Registry reg =
java.rmi.registry.LocateRegistry.getRegistry(Globals.server_host, 1099,
rmicsf);
Spotify or = (Spotify) reg.lookup(Globals.remote_name);
SpotifyServer orServer = (SpotifyServer) reg.lookup(Globals.remote_name);
String respuesta = or.auth("hector", "1234");
System.out.println("[Respuesta: "+respuesta+"]");
......
......@@ -17,8 +17,12 @@ public class PrimerasOperaciones {
System.setProperty("java.rmi.server.hostname",Globals.client_host);
try {
SpotifyServer orServer = (SpotifyServer) Naming.lookup("rmi://"+Globals.server_host+"/"+Globals.remote_name);
Spotify or = (Spotify) Naming.lookup("rmi://"+Globals.server_host+"/"+Globals.remote_name);
javax.rmi.ssl.SslRMIClientSocketFactory rmicsf = new javax.rmi.ssl.SslRMIClientSocketFactory();
java.rmi.registry.Registry reg =
java.rmi.registry.LocateRegistry.getRegistry(Globals.server_host, 1099,
rmicsf);
Spotify or = (Spotify) reg.lookup(Globals.remote_name);
SpotifyServer orServer = (SpotifyServer) reg.lookup(Globals.remote_name);
// Saludo
String saludo = or.hello();
......
......@@ -18,8 +18,13 @@ public class SegundasOperaciones {
System.setProperty("java.rmi.server.hostname",Globals.client_host);
try {
SpotifyServer orServer = (SpotifyServer) Naming.lookup("rmi://"+Globals.server_host+"/"+Globals.remote_name);
Spotify or = (Spotify) Naming.lookup("rmi://"+Globals.server_host+"/"+Globals.remote_name);
javax.rmi.ssl.SslRMIClientSocketFactory rmicsf = new javax.rmi.ssl.SslRMIClientSocketFactory();
java.rmi.registry.Registry reg =
java.rmi.registry.LocateRegistry.getRegistry(Globals.server_host, 1099,
rmicsf);
Spotify or = (Spotify) reg.lookup(Globals.remote_name);
SpotifyServer orServer = (SpotifyServer) reg.lookup(Globals.remote_name);
//Saludo
String saludo = or.hello();
......
File deleted
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment