Compare commits

..

No commits in common. "f5325b58528c351c265f4c66be4511bf00af2a8c" and "d43ad8168e609f7c826ab796075971e7d5c692c2" have entirely different histories.

13 changed files with 191 additions and 7 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
/config.json /config.json
/.idea/

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

16
.idea/deployment.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="Always" serverName="1" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false">
<option name="confirmBeforeUploading" value="false" />
<serverData>
<paths name="1">
<serverdata>
<mappings>
<mapping deploy="/" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
<option name="myAutoUpload" value="ALWAYS" />
</component>
</project>

37
.idea/misc.xml Normal file
View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id>Error handlingJava</id>
</State>
<State>
<id>Java</id>
</State>
<State>
<id>Probable bugsJava</id>
</State>
<State>
<id>RESTful Web Service (JAX-RS)</id>
</State>
<State>
<id>Spring</id>
</State>
<State>
<id>Spring BootSpring</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>User defined</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/protected-resources-list.iml" filepath="$PROJECT_DIR$/.idea/protected-resources-list.iml" />
</modules>
</component>
</project>

4
.idea/php.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpProjectSharedConfiguration" php_language_level="8.0" />
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

8
.idea/sshConfigs.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SshConfigs">
<configs>
<sshConfig authType="PASSWORD" host="172.16.100.40" id="1f4a1f9f-da20-402f-aacd-0cb94b211004" port="22" nameFormat="DESCRIPTIVE" username="root" useOpenSSHConfig="false" />
</configs>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

14
.idea/webServers.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WebServers">
<option name="servers">
<webServer id="a4ede633-44cd-40df-a8db-a1d5f363083d" name="1">
<fileTransfer rootFolder="/opt/protected-resources-list" accessType="SFTP" host="172.16.100.40" port="22" sshConfigId="1f4a1f9f-da20-402f-aacd-0cb94b211004" sshConfig="root@172.16.100.40:22 password">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
</fileTransfer>
</webServer>
</option>
</component>
</project>

View File

@ -10,12 +10,6 @@ class API extends Plugin
$this->config["key"] = sha1(rand() . uniqid()); $this->config["key"] = sha1(rand() . uniqid());
$this->context->getConfig()->save(); $this->context->getConfig()->save();
} }
$headers = getallheaders();
if ($headers and isset($headers["X-Auth"]) and $headers["X-Auth"] == md5($this->config["key"])) {
$_SESSION["auth"] = true;
}
} }
public function getKey(): string public function getKey(): string

12
sort.php Normal file
View File

@ -0,0 +1,12 @@
<?php
const FILE = "test.txt";
$data = file_get_contents(FILE);
$data = explode("\n", $data);
sort($data);
file_put_contents(FILE, implode("\n", $data));

69
test.txt Normal file
View File

@ -0,0 +1,69 @@
"108.138.0.0/15",
"108.156.0.0/14",
"111.13.0.0/8",
"116.129.226.0/24",
"118.193.97.0/24",
"119.147.182.0/24",
"120.232.0.0/16",
"120.52.0.0/16",
"13.0.0.0/8",
"130.176.0.0/16",
"143.204.0.0/16",
"144.220.0.0/16",
"15.128.0.0/9",
"18.0.0.0/8",
"180.163.57.0/24",
"204.246.0.0/16",
"205.251.0.0/16",
"216.137.32.0/19",
"3.0.0.0/8",
"34.128.0.0/9",
"35.0.0.0/8",
"36.103.232.0/24",
"43.218.56.0/24",
"44.0.0.0/8",
"47.129.0.0/16",
"52.0.0.0/8",
"54.0.0.0/8",
"58.254.138.0/24",
"64.252.0.0/16",
"65.8.0.0/16",
"65.9.0.0/16",
"70.132.0.0/18",
"71.152.0.0/17",
"99.0.0.0/8",