Jump to content
  • 0

anyone able to create GET function lua .script


phpdev
 Share

Question

Hello,

i have created script ,lua

and i would like linked this with website php or html checking

for example

the code is

*****

if menu1 == 1 then A() end
if menu1 == 2 then B() end
if menu1 == 3 then C() end
if menu1 == 4 then D() end
if menu1 == 5 then Exit() end

*****

 

and to start the code should be first checking with my webite like "http://*****.com/xx.php"

if i have add source  on website "1"

the script is open and show in script "login"

if i have change it my website to "0"

unlogin try again

script not open and

end

could you help me

also i found lua someone linked with his website script

https://www110.zippyshare.com/v/EfgEpwl6/file.html

could you help me

 

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

print('GET 4: ', gg.makeRequest('https://localhost.com/login.php', {['User-Agent']='My BOT'}).content)

same as this coded

but i need including

function right()
  gg.alert("1")
end
 
 
function wrong()
  gg.alert("0")
  os.exit();

 

geting the number from the website

i need help

Edited by phpdev
Link to comment
Share on other sites

  • 0

Hello,

i have created script ,lua

and i would like linked this with website php or html checking

for example

the code is

*****

if menu1 == 1 then A() end
if menu1 == 2 then B() end
if menu1 == 3 then C() end
if menu1 == 4 then D() end
if menu1 == 5 then Exit() end

*****

 

and to start the code should be first checking with my webite like "http://*****.com/xx.php"

if i have add source  on website "1"

the script is open and show in script "login"

if i have change it my website to "0"

unlogin try again

script not open and

end

print('GET 4: ', gg.makeRequest('https://localhost.com/login.php', {['User-Agent']='My BOT'}).content)

same as this coded

but i need including

function right()
  gg.alert("1")
end
 
 
function wrong()
  gg.alert("0")
  os.exit();

 

geting the number from the website

i need help

could you help me

 

Link to comment
Share on other sites

  • 0

I'm guessing you're trying to do something like what PMH is doing??
I don't really understand what you're trying to say in the post as it's a bit confusing from your explaination.

But the processing should be done on the server side (php) not on the client side (lua), the client side should only process data that they got from the server.

To illustrate this in a simple way, this is what should happens

Client -> send data to server -> Server receive data -> Server process data -> Server display response content -> client get the content -> client process the content.

Again, CLIENT does not process either the login is correct or wrong, or what should be displayed, the server does that, the client is only displaying what the server tell it to display.

Edited by ForbiddenSaga
Link to comment
Share on other sites

  • 0
5 minutes ago, ForbiddenSaga said:

I'm guessing you're trying to do something like what PMH is doing??
I don't really understand what you're trying to say in the post as it's a bit confusing from your explaination.

But the processing should be done on the server side (php) not on the client side (lua), the client side should only process data that they got from the server.

To illustrate this in a simple way, this is what should happens

Client -> send data to server -> Server receive data -> Server process data -> Server display response content -> client get the content -> client process the content.

Again, CLIENT does not process either the login is correct or wrong, or what should be displayed, the server does that, the client is only displaying what the server tell it to display.

i will exploit to you

print('FULL: ', gg.makeRequest('http://xxxx.com/php/php.php'))
function right()
  gg.alert("login done")
end
 
 
function wrong()
  gg.alert("can't login")
  os.exit();
end
 
if gg.makeRequest == "login" then
right()
else
wrong()
end

 

i will like to doing this but i made this not working by my self

so

http://xxxx.com/php/php.php

here data is "login"

getting this from .php

login

if its not login showing on php

that means not working and exit from the script

 

Link to comment
Share on other sites

  • 0

Here's a quick hint so you can make it work.

  1. Learn English
  2. Learn PHP
  3. Understand LUA & GG API

Your lua script should look like this.

local login = 'https://localhost/login.php'

local user = gg.prompt(
    {'Username', 'Password'},
	{},
	{[1]='text',[2]='text'}
)

if user[1] == '' or user[2] == '' then 
	gg.alert ("Username or Password is Empty!")
else
	data = gg.makeRequest(login, nil, 'username='..user[1]..'&password='..user[2]).content
end

if data == '0' then
	print ("Login failed, please try again.")
elseif data == '1' then
	print ("Login succesfull")
end

 

Edited by ForbiddenSaga
Link to comment
Share on other sites

  • 0
1 minute ago, ForbiddenSaga said:

Here's a quick hint so you can make it work.

  1. Learn English
  2. Learn PHP
  3. Understand LUA & GG API

i know how to using PHP

as i just make it basic

<?

echo "login"

?>

then i will change it on future

but i am now trying to work on LUA

how i can fix it

Link to comment
Share on other sites

  • 0
3 minutes ago, phpdev said:

i know how to using PHP

as i just make it basic

<?

echo "login"

?>

then i will change it on future

but i am now trying to work on LUA

how i can fix it

You clearly don't know how to write a php code if your code looks like that.

<?php
echo "Login";
?>

PHP require  ; at every end of line.

And you might be able to write a little LUA, but you surely don't understand how GG API and LUA works,
@Enyby made a very useful request API, saving us a TON of works. I suggest you read https://gameguardian.net/help/ again.

Link to comment
Share on other sites

  • 0
9 minutes ago, ForbiddenSaga said:

Here's a quick hint so you can make it work.

  1. Learn English
  2. Learn PHP
  3. Understand LUA & GG API

Your lua script should look like this.


local login = 'https://localhost/login.php'

local user = gg.prompt(
    {'Username', 'Password'},
	{},
	{[1]='text',[2]='text'}
)

if user[1] == '' or user[2] == '' then 
	gg.alert ("Username or Password is Empty!")
else
	data = gg.makeRequest(login, nil, 'username='..user[1]..'&password='..user[2]).content
end

if data == '0' then
	print ("Login failed, please try again.")
elseif data == '1' then
	print ("Login succesfull")
end

Thank you so its working with get right ?

and if  i need to make just 1 form

i have delete user[2])

and so Data 1 or 0 i have to made it from php right

 

Link to comment
Share on other sites

  • 0
2 hours ago, ForbiddenSaga said:

Here's a quick hint so you can make it work.

  1. Learn English
  2. Learn PHP
  3. Understand LUA & GG API

Your lua script should look like this.


local login = 'https://localhost/login.php'

local user = gg.prompt(
    {'Username', 'Password'},
	{},
	{[1]='text',[2]='text'}
)

if user[1] == '' or user[2] == '' then 
	gg.alert ("Username or Password is Empty!")
else
	data = gg.makeRequest(login, nil, 'username='..user[1]..'&password='..user[2]).content
end

if data == '0' then
	print ("Login failed, please try again.")
elseif data == '1' then
	print ("Login succesfull")
end

 

i got this msg

local login = "http://localhost.php"

unexpected symbol "i"

Link to comment
Share on other sites

  • 0
On 8/13/2018 at 1:38 PM, ForbiddenSaga said:

Here's a quick hint so you can make it work.

  1. Learn English
  2. Learn PHP
  3. Understand LUA & GG API

Your lua script should look like this.


local login = 'https://localhost/login.php'

local user = gg.prompt(
    {'Username', 'Password'},
	{},
	{[1]='text',[2]='text'}
)

if user[1] == '' or user[2] == '' then 
	gg.alert ("Username or Password is Empty!")
else
	data = gg.makeRequest(login, nil, 'username='..user[1]..'&password='..user[2]).content
end

if data == '0' then
	print ("Login failed, please try again.")
elseif data == '1' then
	print ("Login succesfull")
end

 

hello sir can you come on telegram and sms me @ADYAZ OR T.me/ADYAZ I need ur help and also i gonna pay you for these

Link to comment
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
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.