Skip to content

Commit

Permalink
🔥Update 1.0 (Anti-Censor)
Browse files Browse the repository at this point in the history
  • Loading branch information
meigoc authored Apr 19, 2024
1 parent 9bb5860 commit 0341561
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 0 deletions.
28 changes: 28 additions & 0 deletions anti-censorship.dnproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project author="woerc" authorOS="Windows 10" createdAt="1713550018461" ideName="DevelNext" ideVersion="16.7.0" ideVersionHash="2017103112" name="anti-censorship" packageName="meigo" template="ide\project\templates\DefaultGuiProjectTemplate" updatedAt="1713550633531">
<tree>
<expanded>
<path src=""/>
<path src="/src"/>
<path src="/src/.theme"/>
<path src="/src/meigo"/>
<path src="/src/meigo/forms"/>
<path src="/src/meigo/modules"/>
</expanded>
</tree>
<openedFiles>
<file src="anti-censorship.dnproject"/>
<file selected="1" src="src/meigo/modules/AppModule.php"/>
</openedFiles>
<files/>
<behaviours>
<behaviour class="ide\project\behaviours\BundleProjectBehaviour"/>
<behaviour class="ide\project\behaviours\PhpProjectBehaviour"/>
<behaviour class="ide\project\behaviours\JavaPlatformBehaviour"/>
<behaviour class="ide\project\behaviours\GuiFrameworkProjectBehaviour"/>
<behaviour class="ide\project\behaviours\RunBuildProjectBehaviour"/>
<behaviour class="ide\project\behaviours\ShareProjectBehaviour"/>
<behaviour class="ide\project\behaviours\BackupProjectBehaviour"/>
<behaviour class="ide\project\behaviours\GradleProjectBehaviour"/>
</behaviours>
</project>
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

plugins {
id 'application'
}


mainClassName = "org.develnext.jphp.ext.javafx.FXLauncher"
jar.archiveName = "dn-compiled-module.jar"


sourceSets {
main.resources.srcDirs = ['src_generated', 'src', 'vendor/ide.bundle.std.JPHPDesktopDebugBundle', 'vendor/ide.bundle.std.JPHPCoreBundle', 'vendor/ide.bundle.std.JPHPRuntimeBundle', 'vendor/ide.bundle.std.JPHPJsonBundle', 'vendor/ide.bundle.std.JPHPXmlBundle', 'vendor/ide.bundle.std.UIDesktopBundle']
}
69 changes: 69 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<project name="anti-censorship" basedir=".">
<!-- set global properties for this build -->
<property name="name" location="anti-censorship"/>
<property name="build" location="build"/>
<property name="dist" location="build/dist"/>
<property name="launch4j.dir" location="C:\Program Files (x86)\DevelNext\tools\Launch4j" />
<property name="jre.dir" location="C:\Program Files (x86)\DevelNext\tools\jre" />

<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar
:${launch4j.dir}/lib/xstream.jar" />

<target name="init">
<mkdir dir="${build}"/>
</target>

<target name="jar" depends="init" description="generate the distribution">
<mkdir dir="${dist}/lib"/>

<jar destfile="${dist}/lib/dn-compiled-module.jar" encoding="UTF-8" level="7">
<fileset dir='src_generated' excludes='.debug/** **/*.source **/*.sourcemap **/*.axml **/*.php' erroronmissingdir='false'/>
<fileset dir='src' excludes='.debug/** **/*.source **/*.sourcemap **/*.axml **/*.php' erroronmissingdir='false'/>
<fileset dir='vendor/ide.bundle.std.JPHPDesktopDebugBundle' excludes='.debug/** **/*.source **/*.sourcemap **/*.axml **/*.php' erroronmissingdir='false'/>
<fileset dir='vendor/ide.bundle.std.JPHPCoreBundle' excludes='.debug/** **/*.source **/*.sourcemap **/*.axml **/*.php' erroronmissingdir='false'/>
<fileset dir='vendor/ide.bundle.std.JPHPRuntimeBundle' excludes='.debug/** **/*.source **/*.sourcemap **/*.axml **/*.php' erroronmissingdir='false'/>
<fileset dir='vendor/ide.bundle.std.JPHPJsonBundle' excludes='.debug/** **/*.source **/*.sourcemap **/*.axml **/*.php' erroronmissingdir='false'/>
<fileset dir='vendor/ide.bundle.std.JPHPXmlBundle' excludes='.debug/** **/*.source **/*.sourcemap **/*.axml **/*.php' erroronmissingdir='false'/>
<fileset dir='vendor/ide.bundle.std.UIDesktopBundle' excludes='.debug/** **/*.source **/*.sourcemap **/*.axml **/*.php' erroronmissingdir='false'/>

</jar>
</target>

<target name="dist" depends="jar" description="">

</target>

<target name="onejar" depends="dist">
<jar destfile="${dist}/anti-censorship.jar" duplicate="preserve" level="7" encoding="UTF-8">
<fileset dir="${dist}/gen" />
<zipfileset src="${dist}/lib/dn-compiled-module.jar" />
<zipfileset src='${dist}/lib/asm-all.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/jphp-core.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/jphp-runtime.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/dn-php-sdk.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/gson.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/jphp-json-ext.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/jphp-xml-ext.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/jphp-gui-ext.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/jphp-desktop-ext.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/jphp-zend-ext.jar' excludes='JPHP-INF/sdk/** **/*.php' /> <zipfileset src='${dist}/lib/jphp-app-framework.jar' excludes='JPHP-INF/sdk/** **/*.php' />

<manifest>
<attribute name="Main-Class" value="org.develnext.jphp.ext.javafx.FXLauncher" />
</manifest>
</jar>

<delete dir="${dist}/gen" failonerror="false" />
<delete dir="${dist}/lib" failonerror="false" />
</target>

<target name="clean" description="clean up">
<delete dir="${build}"/>
</target>

<target name="copy-jre">
<mkdir dir="${dist}/jre" />
<copy todir="${dist}/jre" >
<fileset dir="${jre.dir}" includes="**"/>
</copy>
</target>

<target name="launch4j">

<delete file="" failonerror="false" />
<delete dir="${dist}/gen" failonerror="false" />
</target>
</project>
Binary file added build/dist/anti-censorship.jar
Binary file not shown.
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = ''
6 changes: 6 additions & 0 deletions src/JPHP-INF/launcher.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# MAIN CONFIGURATION

bootstrap.file = res://JPHP-INF/.bootstrap

fx.splash=
fx.splash.alwaysOnTop=0
2 changes: 2 additions & 0 deletions src/meigo/modules/AppModule.behaviour
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<behaviours/>
4 changes: 4 additions & 0 deletions src/meigo/modules/AppModule.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"props": [],
"components": []
}
148 changes: 148 additions & 0 deletions src/meigo/modules/AppModule.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
<?php
namespace meigo\modules;

use std, gui, framework, meigo;


class AppModule extends AbstractModule
{

/**
* @event construct
*/
function doConstruct(ScriptEvent $e = null)
{
echo "[INFO] Application Started\n";
echo "▄▀█ █▄░█ ▀█▀ █ ▄▄ █▀▀ █▀▀ █▄░█ █▀ █▀█ █▀█   ▄█ ░ █▀█\n";
echo "█▀█ █░▀█ ░█░ █ ░░ █▄▄ ██▄ █░▀█ ▄█ █▄█ █▀▄   ░█ ▄ █▄█\n";
echo "Anti-Censor v1.0 | Build 04192349_24 | Developed by Meigo\n";

$upd = trim(file_get_contents("https://raw.githubusercontent.com/meigoc/anti-censor/main/update_system/latest"));
if ($upd != "1.0"){
echo "==============================================\nA new update has been found! Download it from our github.\n==============================================\n";
}

echo "* Github: @meigoc\n";
echo "* Discord: @glebbb\n";
echo "* Repository: github.com/meigoc/anti-censor\n\n";
echo "Menu: (Commands)\n\n";
echo "& anticensor (letter-change/font-change) {text}\n";
echo " Letter-change: This type of anti-censorship changes Russian letters to similar English counterparts (badly bypasses censorship)\n";
echo " Font-change: This type of anti-censorship changes the font of Russian letters (perfectly bypasses censorship)\n";
echo "& license\n";
echo "& exit\n";

echo "❤️ Support us, we work for free!\nPayPal: temp. not support\nDonationAlerts: https://www.donationalerts.com/r/meigostudios\n";

$misc = new MiscStream('stdin');
$misc->eachLine(function($line){
$cmd = str::split($line, ' ');
$method = 'cmd' . $cmd[0];

if (method_exists($this, $method)){ // Если метод существует
unset($cmd[0]);
echo call_user_func_array([$this, $method], $cmd);
} else { // неизвестная команда
echo "Unsupported command";
}

echo "\n";
});
}

// Anti-Censor Commands

/**
* Command: Now
*/
function cmdanticensor(...$args){
switch ($args[0]){
case 'letter-change': // анти-цензура путем подменой похожих букв
$text = str::join($args, ' ');
$zamena = array("letter-change", "К", "е", "Е", "Н", "х", "Х", "В", "а", "А", "р", "Р", "о", "О", "с", "С", "М");
$naeto = array("", "K", "e", "E", "H", "x", "X", "B", "a", "A", "p", "P", "o", "O", "c", "C", "M");
$a = str_replace($zamena, $naeto, $text);

// "Подсветка" изменённых символов. Пока-что в разработке...
$search = 'K';
$pos = str::posIgnoreCase($a, $search);
if ($pos != "-1"){
$repeat = str::repeat(" ", $pos);
}
// --- end ---

// Выводим:
echo $a."\n";
echo $repeat."~"; // "Подсветка" изменённых символов. Пока-что в разработке...
//return $a; * не нужно.
break;

case 'font-change': // анти-цензура путем изменения шрифта
$text = str::join($args, ' ');
$zamena = array("font-change", "у", "к", "е", "н", "ф", "в", "а", "р", "о", "с");
$naeto = array("", "ʏ", "", "", "ʜ", "ȹ", "ʙ", "", "", "", "");
$a = str_replace($zamena, $naeto, $text);

// "Подсветка" изменённых символов. Пока-что в разработке...
$search = 'ȹ';
$pos = str::posIgnoreCase($a, $search);
if ($pos != "-1"){
$repeat = str::repeat(" ", $pos);
}
// --- end ---

// Выводим:
echo $a."\n";
echo $repeat."~"; // "Подсветка" изменённых символов. Пока-что в разработке...
//return $a; * не нужно.
break;

}
}
// Experimental commands

function cmdlicense(){
// license
echo "█░░ █ █▀▀ █▀▀ █▄░█ █▀ █▀▀\n";
echo "█▄▄ █ █▄▄ ██▄ █░▀█ ▄█ ██▄\n";
echo "License @ GNU GENERAL PUBLIC LICENSE v3.0\n";
echo "============================================\n";
$a = file_get_contents("https://raw.githubusercontent.com/meigoc/anti-censor/main/LICENSE");
echo $a."\n";
echo "============================================\n";
}

// Basic commands (for developer)

/**
* Command: Now
*/
function cmdNow(){
return Time::Now()->getTime();
}

/**
* Command: Base64
*/
function cmdbase64(...$args){
switch ($args[0]){
case 'encode':
return base64_encode($args[1]);
break;

case 'decode':
return base64_decode($args[1]);
break;

}
}

/**
* Command: Exit
*/
function cmdExit(){
echo "Exiting...\nIf the exit fails, use the keyboard shortcut CTRL+C\n";
exit;
}

}
2 changes: 2 additions & 0 deletions src/meigo/modules/AppModule.php.axml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root/>

0 comments on commit 0341561

Please sign in to comment.