Jump to content
Sign in to follow this  
Hybrid

RemoteControl: Phone-PC

Recommended Posts

Hybrid

Hello there.

I have an interesting idea in my mind.

I have a Samsung Galaxy Mini[my phone] and i would like to make a "Remote Access" to ShutDown/Restart my PC via phone.

First, I had an idea, but I needed to code the program for my phone, and I have no idea abt Java coding for Android OS Phones.

So I would make a private website via webs or w/e,which will be accessed by me via my phone. On that website I will have more options: Restart / ShutDown / Sleep/ etc.

When I press a button, data is sent in some way,somewhere, and the tool which will be coded in AutoIt will read that data and do the following func: Restart / ShutDown / Sleep/ depends by what I choose on that website.

It's just an idea. if you have better ideas just say em. I didn't think very much abt this project.

Waiting for ideas.

Edited by Hybrid

Share this post


Link to post
Share on other sites
DicatoroftheUSA

A cheezy way to do this would be to have a script that sits on you computer that watches for a specific files, or line in a file.

Then write another script for the Andriod that updates the file to correspond with a command.

Isn't there already scripts that do what you want for Andriod?

Share this post


Link to post
Share on other sites
varelov

In order to remotely restart your pc, it has to have the Wake OnLAN capable BIOS. Further, you could make the restart/shutdown available via an intranet website sitting on the pc you want to control remotely.

For added fun, you might want to explore the open source telephony project called Asterisk and set up a VoIP portal on your pc that would expose shutdown/restart via a phone call.

Share this post


Link to post
Share on other sites
BrewManNH

If your computer has MBEx capability it might be even easier to turn it on and off, you might even be able to do it via the web if your router can be port forwarded on port 16992.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
Hybrid

Oki, tyvm for all ideas,ill check em and come ack to tell you what i choosed

Share this post


Link to post
Share on other sites
Mat

The correct way is probably to start an ssh server on your computer, and then use that. Would be possible to write an app to send the commands but would most likely be easier to get an app like connectbot which is a simple ssh client terminal app.

I use the above a lot. Create a folder somewhere and add it to the path, add .au3 and .a3x to PATHEXT and you can very easily manage your own commands just as AutoIt scripts.

Share this post


Link to post
Share on other sites
PhoenixXL

@Hybrid,

Easy Solution

Edited by PhoenixXL
  • Like 1

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites
caleb41610

Hello there.

I have an interesting idea in my mind.

I have a Samsung Galaxy Mini[my phone] and i would like to make a "Remote Access" to ShutDown/Restart my PC via phone.

First, I had an idea, but I needed to code the program for my phone, and I have no idea abt Java coding for Android OS Phones.

So I would make a private website via webs or w/e,which will be accessed by me via my phone. On that website I will have more options: Restart / ShutDown / Sleep/ etc.

When I press a button, data is sent in some way,somewhere, and the tool which will be coded in AutoIt will read that data and do the following func: Restart / ShutDown / Sleep/ depends by what I choose on that website.

It's just an idea. if you have better ideas just say em. I didn't think very much abt this project.

Waiting for ideas.

One method may be...

Have a terminal open on the web server, and use "tail -f" on the apache log.

Have an autoit script search for strings with ConsoleRead()

When you click buttons on the website, autoit will see it and then call a function.

Share this post


Link to post
Share on other sites
infoaliasgar

You can use TeamViewer remote software in order to remotely control your computer from Samsung phone. Also, if you would also like to establish remote connection between computers, you can use various remote support services such as logmeinrescue, gosupportnow etc.

Share this post


Link to post
Share on other sites
Morthawt

I set this up a long while ago to where I had an apache web server running on my PC, then I made an autoit program that scanned the log file for certain non-existent URL's like /morthawt-ctrl/shutdown/

As soon as my program saw that there was something that started with /morthawt-ctrl/ and ended with a / it would perform an action based on a case which matched the middle part.

edit:

I am making my video of it that I made for a friend unlisted so you can check it out working. I will be setting it back to private though in a day or two so if you want to see my program working (which I no longer bother setting back up after formatting my pc) then you might want to check it out soon: https://www.youtube.com/watch?v=h6SHo4PgdYc

Edit2:

I am not going to give any support for this, that being said I will release the source code to what I had made, maybe it will give you some ideas on technique perhaps..

#NoTrayIcon
#RequireAdmin
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=C:ProgramDataRCPRemote Control Protocol.exe
#AutoIt3Wrapper_Compression=4
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include 
#include 
#include 

Global $networkerror = 0
Global $LineDataToProcess[20]

$reg = RegRead("HKEY_LOCAL_MACHINE64SOFTWAREMorthawt", "decryption")
$mypass = '0xEFC9B0832A966F9B5382014930'
$alteredpass = '0x5F2EA3C06773BEECBFB97F06EFD3A6485CFF0211D4363E610F1EEE583F'

$mydecryptedpass = BinaryToString(_Crypt_DecryptData($mypass, $reg, $CALG_AES_256))
$altereddecryptedpass = BinaryToString(_Crypt_DecryptData($alteredpass, $reg, $CALG_AES_256))

$previouslength = 0

$httpLogLocation = 'C:Program Files (x86)Apache Software FoundationApache2.2logsaccess.log'
$internallogfilename = 'morthawt-actions-log.txt'
$InternalLogFile = FileOpen('C:Program Files (x86)Apache Software FoundationApache2.2securedocsrcp' & $internallogfilename, 1)

$httpLogFile = FileOpen($httpLogLocation)
$httpLogFileLineCount = _FileCountLines($httpLogLocation)
$previouslength = $httpLogFileLineCount

While 1

$httpLogFileLineCount = _FileCountLines($httpLogLocation)

For $a = 0 To (($httpLogFileLineCount - $previouslength) - 1)

$line = FileReadLine($httpLogLocation, ($httpLogFileLineCount - $a))
$LineDataToProcess = StringSplit($line, ' ')
ConsoleWrite($LineDataToProcess[7] & @CRLF)

If $LineDataToProcess[3] = 'techwg' And $LineDataToProcess[9] <> 401 Then

Switch $LineDataToProcess[7]
Case '/rcp/cmdthawt-shutdown/'
WriteLog()
Shutdown(5)
ExitLoop

Case '/rcp/cmdthawt-dismount-encrypted-partitions/'
Run("C:Program FilesTrueCryptTrueCrypt.exe /d /f /w /q /s")
WriteLog()
ExitLoop

Case '/rcp/cmdthawt-doorbell/'
SoundPlay('D:doorbell.mp3', 0)
WriteLog()
ExitLoop

Case '/rcp/cmdthawt-reboot/'
WriteLog()
Shutdown(6)
ExitLoop

Case '/rcp/cmdthawt-cut-network/'
WriteLog()
Run(@ComSpec & ' /c ipconfig /release', '', @SW_HIDE)
ExitLoop

Case '/rcp/cmdthawt-lock-workstation/'
WriteLog()
Run(@ComSpec & ' /c net user techwg ' & $altereddecryptedpass, '', @SW_HIDE)
Sleep(1000)
Run(@ComSpec & ' /c schtasks /run /TN lockpc', '', @SW_HIDE)
ExitLoop

Case '/rcp/cmdthawt-unlock-workstation/'
WriteLog()
Run(@ComSpec & ' /c net user techwg ' & $mydecryptedpass, '', @SW_HIDE)
ExitLoop

EndSwitch
EndIf
Next
If FileExists(@DesktopDir & 'trcp-exit.txt') Then Exit
If FileExists(@DesktopDir & 'trcp-log.txt') Then
FileClose($InternalLogFile)
FileDelete('C:Program Files (x86)Apache Software FoundationApache2.2securedocsrcp' & $internallogfilename)
$InternalLogFile = FileOpen('C:Program Files (x86)Apache Software FoundationApache2.2securedocsrcp' & $internallogfilename, 1)
EndIf

Sleep(1000)
$previouslength = $httpLogFileLineCount
WEnd

Func WriteLog()
FileWriteLine($InternalLogFile, '-------------------------' & @CRLF & @MDAY & '-' & @MON & '-' & @YEAR & ' [ ' & @HOUR & ':' & @MIN & ':' & @SEC & ' ]' & @CRLF & $LineDataToProcess[1] & @CRLF & '"' & $LineDataToProcess[7] & '"' & @CRLF)
EndFunc ;==>WriteLog

By the way, I had set it so that if I lock the computer using this it would set my password to a non-standard password I never use but that I do know.. so if someone managed to get my password they would not be able to log back into my computer. Then I could use my phone's internet to set my windows password back ti the real password so I can unlock it.

Edited by Morthawt

Share this post


Link to post
Share on other sites
Mechaflash

A haxor method to do this without special protocols (this is some random idea I just concocted)

Install your favorite mail program on your computer. Create a new gmail account (HybridRemote@gmail.com). Attach this account to your mail program. Find an add-on that will auto-extract (save in a text file) any email that comes into that account. Emails that come in are now in a text file.

Create a script to look for that file every 3 seconds or something. If it exists, read it. If it contains commands you've sent via email, copy the commands into memory, delete the file, and run the commands.


Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×