Jump to content
  • 0

anyone able to create GET function lua .script


Question

Posted

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

 

13 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted

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

 

  • 0
Posted (edited)

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
  • 0
Posted
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

 

  • 0
Posted (edited)

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
  • 0
Posted
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

  • 0
Posted
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.

  • 0
Posted
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

 

  • 0
Posted
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"

  • 0
Posted
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

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
×
×
  • 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.