| View previous topic :: View next topic |
| Author |
Message |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1533
|
Posted: Tue Jan 07, 2020 12:19 am Post subject: Write to remote server (REPEAT) |
|
|
Hello again.
Is there a simple code to send text to the document on the remote server?
I'm bringing this up again, but that's what I've been interested in lately.
There are some trials below, unfortunately it doesn't work.
| Code: | function Write()
local int=getInternet()
local ad = "Admin: "
local text = ("\n"..ad.." "..UDF1.CEEdit1.Text)
URL="https://docs.google.com/document/d/1cvHv3L14MjqTQavpnUVRkvDf6z4_Ss5_y60F7xj__mw/edit="..text.."&is64bit="..tostring(cheatEngineIs64Bit())
s=int.getURL(URL)
int.destroy()
end |
or
| Code: | function Write()
local ad = "Admin: "
local text = ("\n"..ad.." "..UDF1.CEEdit1.Text)
local int=getInternet()
local URL = 'https://docs.google.com/document/d/1cvHv3L14MjqTQavpnUVRkvDf6z4_Ss5_y60F7xj__mw/edit='
local s = int.getURL(URL)
text=io.popen(s, "w")
text:write(s)
int.destroy()
end |
Do you have corrections or a different idea?
Thanks in advance.
_________________
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25827 Location: The netherlands
|
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1533
|
Posted: Tue Jan 07, 2020 4:28 am Post subject: |
|
|
I still can't find an example of sending articles to Google documents or a similar platform.
This coding is beyond me.
| Code: | local function encodeAuth(str)
if (str) then
--str = string.gsub (str, "\n", "\r\n")
str = string.gsub (str, "([^%w %-%_%.%~])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
str = string.gsub (str, " ", "+")
end
return str
end
function Write()
local ad = "Admin: "
local text2 = ("\n"..ad.." "..UDF1.CEEdit1.Text)
local text = encodeAuth(text2)
local int=getInternet()
local URL = 'https://docs.google.com/document/d/1cvHv3L14MjqTQavpnUVRkvDf6z4_Ss5_y60F7xj__mw/edit='
local s = int.getURL(URL)
text=io.popen(s, "w")
text:write(s)
int.destroy()
end |
_________________
|
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Tue Jan 07, 2020 5:05 am Post subject: |
|
|
| Dark Byte wrote: | first find out how to do that with just editing the browser url
once you have that working(only then), then keep in mind you also have to urlencode the text. e.g. you can't have spaces or newlines but have to use their hexadecimal equivalents
|
This example of how editing url to write on pastebin. I don't how the rule to write on google document.
| Code: | url= 'https://pastebin.com/api/api_post.php' -- this is url provide by pastebin to allows people creating a new paste/file
api_dev_key = '5f6da4d40eadc258f36114eea7adf72a' -- this my developers key on pastebin
api_paste_code='Hello World' -- this is the text to write on pastebin
local int = getInternet()
int.postURL(url,'api_option=paste&api_dev_key='..api_dev_key..'&api_paste_code='..api_paste_code..'')
response = int.postURL(url,'api_option=paste&api_dev_key='..api_dev_key..'&api_paste_code='..api_paste_code..'')
print(response)
-- the good response will be : https://pastebin.com/i9dpQYSR
-- then try open the respose url, 'Hello World' is there |
Another example according to Aylin script.
| Code: | f = createForm()
f.height = 40
edt = createEdit(f)
btn = createButton(f)
btn.left = edt.left+edt.width+10
btn.caption = 'Resume'
function Write()
local ad = "Admin: "
local text = ("\n"..ad.." "..edt.Text)
url= 'https://pastebin.com/api/api_post.php' -- this is url provide by pastebin to allows people creating a new paste/file
api_dev_key = '5f6da4d40eadc258f36114eea7adf72a' -- this my developers key on pastebin
api_paste_code=text
local int = getInternet()
int.postURL(url,'api_option=paste&api_dev_key='..api_dev_key..'&api_paste_code='..api_paste_code..'')
response = int.postURL(url,'api_option=paste&api_dev_key='..api_dev_key..'&api_paste_code='..api_paste_code..'')
print(response)
end
f.show()
btn.onClick = Write |
| Description: |
|
| Filesize: |
25.1 KB |
| Viewed: |
5203 Time(s) |

|
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1533
|
Posted: Tue Jan 07, 2020 10:23 am Post subject: |
|
|
Thanks @Corroder for the alternative.
There are two problems:
1) "Pastebin" is for limited user (can be accessed via optional server and VPN)
"Google Docs" can be accessed without the help of a global server and VPN.
2) I cannot send multiple notes to the link you provided.
I just recorded one note and it doesn't record another note.
Below is a link to PHP code, but I don't know how to interpret it to Lua.
https://developers.google.com/docs/api/quickstart/php
| Description: |
|
| Filesize: |
112.4 KB |
| Viewed: |
5187 Time(s) |

|
| Description: |
|
| Filesize: |
104.25 KB |
| Viewed: |
5187 Time(s) |

|
_________________
|
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Tue Jan 07, 2020 9:43 pm Post subject: |
|
|
| Aylin wrote: | Thanks @Corroder for the alternative.
There are two problems:
1) "Pastebin" is for limited user (can be accessed via optional server and VPN)
"Google Docs" can be accessed without the help of a global server and VPN.
2) I cannot send multiple notes to the link you provided.
I just recorded one note and it doesn't record another note.
|
1. Not understand what mean of 'limited user'?. I doubt people can access it if they don't have 'api_dev_key' for pastebin.
Google doc's, not sure can be accessed via command line, except via Google Scripts App or gDriveCl.
https://olivermarshall.net/how-to-upload-a-file-to-google-drive-from-the-command-line/
2. Send multiple notes to pastebin?. Here example
| Code: | f = createForm()
f.height = 40
edt = createEdit(f)
btn = createButton(f)
btn.left = edt.left+edt.width+10
btn.caption = 'Resume'
function Write()
local ad = "Admin: "
local text = ("\n"..ad.." "..edt.Text)
local text2 = [[
This is a sample multiline text
which try to write in pastebin
121323
43434
545465767
bla bla bla bla
f = createForm()
f.height = 40
edt = createEdit(f)
btn = createButton(f)
btn.left = edt.left+edt.width+10
btn.caption = 'Resume'
Why he said cannot post multiline text?
]]
url= 'https://pastebin.com/api/api_post.php' -- this is url provide by pastebin to allows people creating a new paste/file
api_dev_key = '5f6da4d40eadc258f36114eea7adf72a' -- this my developers key on pastebin
api_paste_code=("\n"..text.." "..text2)
local int = getInternet()
int.postURL(url,'api_option=paste&api_dev_key='..api_dev_key..'&api_paste_code='..api_paste_code..'')
response = int.postURL(url,'api_option=paste&api_dev_key='..api_dev_key..'&api_paste_code='..api_paste_code..'')
print(response)
end
f.show()
btn.onClick = Write
|
Last, event use PHP script, when access Google Docs, it will show Google API and also need authethication key code.
Maybe its better to search other pages like google docs, pastebin, tinypaste, etc or creating your own online data storage using SQL.
or is possible use CEServer?.
Good luck
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1533
|
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Wed Jan 08, 2020 5:40 pm Post subject: |
|
|
@Aylin, if I may know, what you want to write to an online site like google docs, pastebin, etc?. Is it plain text, script or database?.
If that is a database, I suggest you search for an online database.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1533
|
Posted: Wed Jan 08, 2020 9:54 pm Post subject: |
|
|
| Corroder wrote: | @Aylin, if I may know, what you want to write to an online site like google docs, pastebin, etc?. Is it plain text, script or database?.
If that is a database, I suggest you search for an online database. |
It doesn't matter which site we use.
My goal: Send a few words to a single link
and undo this text.
No problem retrieving text (easy with Google Docs)
| Code: | form = createForm(true)
form.Width = 310
form.Height = 240
m1 = createMemo(form)
m1.Width = 310
m1.Height = 195
m1.ScrollBars = ssAutoBoth
m1.WordWrap = false
b1 = createButton(form)
b1.Left = 115
b1.Top = 205
b1.caption="Call Text"
b1.OnClick = function()
local url = 'https://docs.google.com/document/d/1cvHv3L14MjqTQavpnUVRkvDf6z4_Ss5_y60F7xj__mw/export?format=txt'
local int = getInternet()
local text1 = int.getURL(url)
int.destroy()
m1.append(text1)
end |
But sending text is difficult.
Your solution is sending text, but I can't get it back.
I hope you get a result.
_________________
|
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Thu Jan 09, 2020 1:42 am Post subject: |
|
|
To get RAW DATA from pastebin, simple like this:
example:
| Code: | local url = 'https://pastebin.com/raw/zNp3j8Zy'
local int = getInternet()
local text = int.getURL(url)
int.destroy()
--load(text)()
print(text) |
What you need is to provide pastebin raw data url link.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1533
|
Posted: Thu Jan 09, 2020 2:44 pm Post subject: |
|
|
Approximate solution. But I couldn't adapt it to Lua.
Referance: https://developers.google.com/docs/api/quickstart/php
Example:
| Code: | f = createForm()
f.height = 40
edt = createEdit(f)
btn = createButton(f)
btn.left = edt.left+edt.width+10
btn.caption = 'Resume'
function Write()
local ad = "Admin: "
local text = ("\n"..ad.." "..edt.Text)
url= 'https://docs/quickstart/quickstart.php?' -- this is url provide by pastebin to allows people creating a new paste/file
documentId = '1cvHv3L14MjqTQavpnUVRkvDf6z4_Ss5_y60F7xj__mw='; -- this my developers key on pastebin
title=text
local int = getInternet()
int.postURL(url,'$documentId='..documentId..'$doc=$service->documents->get($documentId);$printf("'..title..'",$doc->getTitle());')
response = int.postURL(url,'$documentId='..documentId..'$doc=$service->documents->get($documentId);$printf("'..title..'",$doc->getTitle());')
print(response)
end
f.show()
btn.onClick = Write |
--------------------------------------
And off-topic: (I'm not sure you're still interested in this, @Corroder)
[[ -- Little program to download files from URLs
-- LuaSocket sample files
-- Author: Diego Nehab ]]
Code: https://github.com/diegonehab/luasocket/blob/master/etc/get.lua
For CE Lua, samples can be taken here.
Diego Nehab our master, very successful in these matters.
_________________
|
|
| Back to top |
|
 |
Lynxz Gaming Expert Cheater
Reputation: 4
Joined: 01 Jul 2017 Posts: 208 Location: help
|
Posted: Mon Jan 13, 2020 3:40 am Post subject: |
|
|
you can create your own php write/read and host it on 000webhost
_________________
my english is bad
discord : rynx#9828 |
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1533
|
Posted: Mon Jan 13, 2020 5:31 am Post subject: |
|
|
| Lynxz Gaming wrote: | | you can create your own php write/read and host it on 000webhost |
It is possible to create this in C # (Login php etc.)
But you may need to align "API" or "Socket" to do with CE.
Still, I think it might be possible with simple codes.
_________________
|
|
| Back to top |
|
 |
|