Skip to content

Commit

Permalink
changes + storage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NightDev701 committed May 5, 2024
1 parent 5391147 commit 8b9535c
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 193 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ bin/
/test.txt
/test.dat
/test_folder/
/key_values/
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ compileJava {
String commit = 'git rev-parse --verify --short HEAD'.execute().text.trim()

group 'pl.nightdev701'
version commit
version "SNAPSHOT-2.0-"+commit

repositories {
maven {
Expand Down
26 changes: 1 addition & 25 deletions src/main/java/pl/nightdev701/OpenAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
import pl.nightdev701.manager.CryptManager;
import pl.nightdev701.manager.FileCryptManager;
import pl.nightdev701.manager.KeyGeneratorManager;
import pl.nightdev701.network.http.HttpRequestHandler;
import pl.nightdev701.network.tcp.ProxyAdapter;
import pl.nightdev701.network.HttpRequestHandler;
import pl.nightdev701.security.honeypot.SSHHoneypot;
import pl.nightdev701.util.CryptType;
import pl.nightdev701.util.stream.OpenPrintStream;
Expand Down Expand Up @@ -220,29 +219,6 @@ public static DatabaseConnector getDatabaseManager(DatabaseFormular formular, Da
return new DatabaseConnector(formular, type, logger);
}

/**
* proxy server, send data to other target
*
* @param localPort
* @param remoteHost
* @param remotePort
*/
public static ProxyAdapter getProxy(int localPort, String remoteHost, int remotePort) {
return getProxy(localPort, remoteHost, remotePort, new DefaultLogger());
}

/**
* proxy server, send data to other target
*
* @param localPort
* @param remoteHost
* @param remotePort
* @param logger
*/
public static ProxyAdapter getProxy(int localPort, String remoteHost, int remotePort, AbstractLogger logger) {
return new ProxyAdapter(localPort, remoteHost, remotePort, logger);
}

/**
* request http and handle it
*
Expand Down
8 changes: 2 additions & 6 deletions src/main/java/pl/nightdev701/io/ValueKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ private ValueKey(T key, AbstractLogger logger) {
this.logger = logger;

boolean created = new File("key_values").mkdir();

if (!created) {
this.logger.log(Level.WARNING, "Value folder cannot created!");
}
}

/**
Expand All @@ -59,15 +55,15 @@ public static ValueKey<String> getKey(Object key, AbstractLogger logger) {
* @return key value
*/
public Object getKeyValue() {
ConfigurationManager data = new ConfigurationManager("key_values", logger);
ConfigurationManager data = new ConfigurationManager("key_values/data", logger);
return data.getValue(key);
}

/**
* write value
*/
public void setKeyValue(String target) {
ConfigurationManager data = new ConfigurationManager("key_values", logger);
ConfigurationManager data = new ConfigurationManager("key_values/data", logger);
data.set(key, target);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.nightdev701.network.http;
package pl.nightdev701.network;

import pl.nightdev701.logger.AbstractLogger;

Expand Down
85 changes: 0 additions & 85 deletions src/main/java/pl/nightdev701/network/tcp/ProxyAdapter.java

This file was deleted.

75 changes: 0 additions & 75 deletions src/main/java/pl/nightdev701/network/udp/ProxyAdapter.java

This file was deleted.

0 comments on commit 8b9535c

Please sign in to comment.