This commit is contained in:
TERMI80 2017-10-19 11:28:39 +00:00 committed by GitHub
commit dc78183897
40 changed files with 39244 additions and 0 deletions

25
TLC-AUTH/TLC.sln Normal file
View file

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.15
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TLC", "TLC\TLC.csproj", "{6B1B862F-71E5-4735-A8ED-48602E2F6D04}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6B1B862F-71E5-4735-A8ED-48602E2F6D04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B1B862F-71E5-4735-A8ED-48602E2F6D04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B1B862F-71E5-4735-A8ED-48602E2F6D04}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B1B862F-71E5-4735-A8ED-48602E2F6D04}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9E17998A-1852-450F-B85E-8F65853FFAAE}
EndGlobalSection
EndGlobal

6
TLC-AUTH/TLC/App.config Normal file
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>

52
TLC-AUTH/TLC/Program.cs Normal file
View file

@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TLSharp;
using TeleSharp.TL;
using TLSharp.Core;
namespace TLC
{
class Program
{
static string phoneCodeHash;
static void Main(string[] args)
{
Run();
}
static async void Run()
{
var store = new FakeSessionStore();
string Alert = "ciao";
TLUser user = null;
var client = new TelegramClient(117, "b42", store);
// if i call client with await it doesn't work
client.ConnectAsync();
if (client.IsUserAuthorized())
{
//get available contacts
var result = await client.GetContactsAsync();
//find recipient in contacts
// var userr = result.users.lists.Where(x => x.GetType() == typeof(TLUser)).Cast<TLUser>().FirstOrDefault(x => x.phone == "98" + TextBox1.Text);
//send message
await client.SendMessageAsync(new TLInputPeerUser() { user_id = user.id }, Alert);
}
else
{
//excption here
phoneCodeHash = await client.SendCodeRequestAsync("39");
Task.WaitAll();
}
}
}
}

View file

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Le informazioni generali relative a un assembly sono controllate dal seguente
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
// associate a un assembly.
[assembly: AssemblyTitle("TLC")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("TLC")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
// COM, impostare su true l'attributo ComVisible per tale tipo.
[assembly: ComVisible(false)]
// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
[assembly: Guid("6b1b862f-71e5-4735-a8ed-48602e2f6d04")]
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
//
// Versione principale
// Versione secondaria
// Numero di build
// Revisione
//
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// usando l'asterisco '*' come illustrato di seguito:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

68
TLC-AUTH/TLC/TLC.csproj Normal file
View file

@ -0,0 +1,68 @@
<?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>{6B1B862F-71E5-4735-A8ED-48602E2F6D04}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>TLC</RootNamespace>
<AssemblyName>TLC</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</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>
<ItemGroup>
<Reference Include="BigMath, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\TLSharp.0.1.0.285\lib\net45\BigMath.dll</HintPath>
</Reference>
<Reference Include="Ionic.Zip, Version=1.9.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DotNetZip.1.9.3\lib\net20\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="Ionic.ZLib, Version=2.0.0.14, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\TLSharp.0.1.0.285\lib\net45\Ionic.ZLib.dll</HintPath>
</Reference>
<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" />
<Reference Include="TeleSharp.TL, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\TLSharp.0.1.0.285\lib\net45\TeleSharp.TL.dll</HintPath>
</Reference>
<Reference Include="TLSharp.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\TLSharp.0.1.0.285\lib\net45\TLSharp.Core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

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>

Binary file not shown.

Binary file not shown.

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,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
714d1f89ebb0778043bce9ee2f2941a69b27b0f3

View file

@ -0,0 +1,49 @@
C:\Users\Davide\source\repos\TLC\TLC\obj\Debug\TLC.csprojResolveAssemblyReference.cache
C:\Users\Davide\source\repos\TLC\TLC\obj\Debug\TLC.csproj.CoreCompileInputs.cache
C:\Users\Davide\source\repos\TLC\TLC\bin\Debug\TLC.exe.config
C:\Users\Davide\source\repos\TLC\TLC\bin\Debug\TLC.exe
C:\Users\Davide\source\repos\TLC\TLC\bin\Debug\TLC.pdb
C:\Users\Davide\source\repos\TLC\TLC\bin\Debug\BigMath.dll
C:\Users\Davide\source\repos\TLC\TLC\bin\Debug\Ionic.Zip.dll
C:\Users\Davide\source\repos\TLC\TLC\bin\Debug\Ionic.ZLib.dll
C:\Users\Davide\source\repos\TLC\TLC\bin\Debug\TeleSharp.TL.dll
C:\Users\Davide\source\repos\TLC\TLC\bin\Debug\TLSharp.Core.dll
C:\Users\Davide\source\repos\TLC\TLC\bin\Debug\Ionic.Zip.xml
C:\Users\Davide\source\repos\TLC\TLC\obj\Debug\TLC.exe
C:\Users\Davide\source\repos\TLC\TLC\obj\Debug\TLC.pdb
E:\TLC\TLC\bin\Debug\TLC.exe.config
E:\TLC\TLC\obj\Debug\TLC.exe
E:\TLC\TLC\obj\Debug\TLC.pdb
E:\TLC\TLC\bin\Debug\TLC.exe
E:\TLC\TLC\bin\Debug\TLC.pdb
E:\TLC\TLC\bin\Debug\BigMath.dll
E:\TLC\TLC\bin\Debug\Ionic.Zip.dll
E:\TLC\TLC\bin\Debug\Ionic.ZLib.dll
E:\TLC\TLC\bin\Debug\TeleSharp.TL.dll
E:\TLC\TLC\bin\Debug\TLSharp.Core.dll
E:\TLC\TLC\bin\Debug\Ionic.Zip.xml
E:\TLC\TLC\obj\Debug\TLC.csprojResolveAssemblyReference.cache
E:\TLC - Copia\TLC\bin\Debug\TLC.exe.config
E:\TLC - Copia\TLC\obj\Debug\TLC.exe
E:\TLC - Copia\TLC\obj\Debug\TLC.pdb
E:\TLC - Copia\TLC\bin\Debug\TLC.exe
E:\TLC - Copia\TLC\bin\Debug\TLC.pdb
E:\TLC - Copia\TLC\bin\Debug\BigMath.dll
E:\TLC - Copia\TLC\bin\Debug\Ionic.Zip.dll
E:\TLC - Copia\TLC\bin\Debug\Ionic.ZLib.dll
E:\TLC - Copia\TLC\bin\Debug\TeleSharp.TL.dll
E:\TLC - Copia\TLC\bin\Debug\TLSharp.Core.dll
E:\TLC - Copia\TLC\bin\Debug\Ionic.Zip.xml
E:\TLC - Copia\TLC\obj\Debug\TLC.csprojResolveAssemblyReference.cache
G:\TLC - Copia\TLC\bin\Debug\TLC.exe.config
G:\TLC - Copia\TLC\obj\Debug\TLC.exe
G:\TLC - Copia\TLC\obj\Debug\TLC.pdb
G:\TLC - Copia\TLC\bin\Debug\TLC.exe
G:\TLC - Copia\TLC\bin\Debug\TLC.pdb
G:\TLC - Copia\TLC\bin\Debug\BigMath.dll
G:\TLC - Copia\TLC\bin\Debug\Ionic.Zip.dll
G:\TLC - Copia\TLC\bin\Debug\Ionic.ZLib.dll
G:\TLC - Copia\TLC\bin\Debug\TeleSharp.TL.dll
G:\TLC - Copia\TLC\bin\Debug\TLSharp.Core.dll
G:\TLC - Copia\TLC\bin\Debug\Ionic.Zip.xml
G:\TLC - Copia\TLC\obj\Debug\TLC.csprojResolveAssemblyReference.cache

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BigMath" version="0.5.0" targetFramework="net461" />
<package id="DotNetZip" version="1.9.3" targetFramework="net461" />
<package id="MarkerMetro.Unity.Ionic.Zlib" version="2.0.0.14" targetFramework="net461" />
<package id="TLSharp" version="0.1.0.285" targetFramework="net461" />
</packages>

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.