Jump to content

Suspend Hosting Account with PHP Script


Recommended Posts

 

18 hours ago, TinkerMan said:

But that form is contacting the API, otherwise it would not work. You need to contact the API again and tell it to suspend the account. Also, I have many (2) free sites on free hosting that use meta-redirects, and nither has been suspended.

 

Also, if a email address has too many suspended accounts, they will be permanently suspended. 

 

 

You need to contact the API, do not employ any other tricks or iFastNet may suspended your reseller privileges. You can use the InfinityFree PHP API wrapper to make this a lot easier. 

This is wrong!

The API has a 8 char unique identifier as main domain, but that hasnt any function. If you go on there, you will get a domain parked page.

On the signup form, this Main domain is really the domain you signed up with and has a function.

For the API, you need this 8 character unique identifier. The normal username wont work.

a.png

19 hours ago, smallhost said:

Users create their account with the form at https://smallhost.us.to/register.php, not the API. Is there any other way to find this identifier, or do I have to manually deactivate a user's account?

The only choices you have is to either change the script to use the API and store the credentials in a db(lot of work, not reccomended), or to suspend accounts via the mofh panel.

For the MOFH panel, I may publish an API that allows you to do this from your code - stay tuned.

Link to post
Share on other sites
1 hour ago, BastelPichi2 said:

This is wrong!

How? Just use the API to delete the account.

 

From InfinityFree's API wrapper:

  • suspend
    • username: The unique, 8 character identifier of the account.
    • reason: A string with information about why you are suspending the account.
    • linked: If true, related accounts will be suspended as well.

 

The API will suspend accounts, same thing as deleting them.

Link to post
Share on other sites
18 hours ago, TinkerMan said:

How? Just use the API to delete the account.

 

From InfinityFree's API wrapper:

  • suspend
    • username: The unique, 8 character identifier of the account.
    • reason: A string with information about why you are suspending the account.
    • linked: If true, related accounts will be suspended as well.

 

The API will suspend accounts, same thing as deleting them.

LISTEN TO ME! THE 8 char unique identifier is NOT the vPanel Login username! Its something like xxxxxxxx.epizy.com and not epiz_12345678! You wont be able to suspend an account with that epiz_12345678 from the API. You need that subdomain that has no function, that you will only get when you create an aaccount via the API. If you try to use the normal API username, it will fail.

Link to post
Share on other sites
21 hours ago, BastelPichi2 said:

On the signup form, this Main domain is really the domain you signed up with and has a function.

For the API, you need this 8 character unique identifier. The normal username wont work.

a.png

That's a great way of explaining! The problem is that I can't suspend an account without the 8 character UI (unique identifier), which needs the API. 

I have another idea, but it would involve a Python server (which might take awhile for me to afford). There's a thing called ChromeDriver where basically Python can control a Chromium-based browser (such as Chrome or Brave). I can potentially make a code where when a request is made to the server it will login to panel.myownfreehost.net, find the account and suspend it. This might take a LOT of time to do, and it might not even work (I'm not that good with Python).

21 hours ago, BastelPichi2 said:

For the MOFH panel, I may publish an API that allows you to do this from your code - stay tuned.

That sounds awesome, I'd definitely credit you if I implement that into SmallHost!

 

20 hours ago, TinkerMan said:

From InfinityFree's API wrapper:

  • suspend
    • username: The unique, 8 character identifier of the account.

The API is incorrect. It doesn't need the username, it needs the 8 character code that @BastelPichi2 was talking about.

Link to post
Share on other sites
5 hours ago, smallhost said:

That's a great way of explaining! The problem is that I can't suspend an account without the 8 character UI (unique identifier), which needs the API. 

I have another idea, but it would involve a Python server (which might take awhile for me to afford). There's a thing called ChromeDriver where basically Python can control a Chromium-based browser (such as Chrome or Brave). I can potentially make a code where when a request is made to the server it will login to panel.myownfreehost.net, find the account and suspend it. This might take a LOT of time to do, and it might not even work (I'm not that good with Python).

That sounds awesome, I'd definitely credit you if I implement that into SmallHost!

 

The API is incorrect. It doesn't need the username, it needs the 8 character code that @BastelPichi2 was talking about.

Why python ? In PHP it is largely possible and easier with CURL.

Link to post
Share on other sites
17 hours ago, MS-DOS said:

Why python ? In PHP it is largely possible and easier with CURL.

I can't suspend an account in PHP without an eight-character identifier that I don't even have. Without this identifier, it's impossible to do it with PHP. I'm considering using Python and ChromeDriver, however it would take some time to implement. Basically a request is made to the Python server and Python controls my either my computer or a server to login to panel.myownfreehost.net for me and suspend an account. I'm not that good with Python, but if there is a way to login to panel.myownfreehost.net with PHP that would be amazing.

Link to post
Share on other sites

So by connecting not to the API but to the panel directly, making a kind of bot is possible and you can have the unique identifier by doing a search with the domain.
You can use the link: http://panel.myownfreehost.net/panel/index2.php?option=drilldowndom&domain_name=DOMAIN then search in the HTML code received the identifier to access the page of the username: http://panel.myownfreehost.net/panel/index2.php?option=drilldown&username=USERNAME and finally with a POST fill in the reason for the suspension and suspend the account is largely feasible.

Edited by MS-DOS
Link to post
Share on other sites
30 minutes ago, MS-DOS said:

So by connecting not to the API but to the panel directly, making a kind of bot is possible and you can have the unique identifier by doing a search with the domain.
You can use the link: http://panel.myownfreehost.net/panel/index2.php?option=drilldowndom&domain_name=DOMAIN then search in the HTML code received the identifier to access the page of the username: http://panel.myownfreehost.net/panel/index2.php?option=drilldown&username=USERNAME and finally with a POST fill in the reason for the suspension and suspend the account is largely feasible.

That sounds possible...the problem is I'd need to code a Python bot to do that or find a way to do it in PHP with cURL. I'd also need to add a user agent header to make it look like its a browser sending the requests because it might not allow automated requests. This will take some time to do...

 

Edit: Here's what I see that the bot needs to do (in this order).

Edited by smallhost
Link to post
Share on other sites
On 1/15/2022 at 3:25 PM, smallhost said:

I have another idea, but it would involve a Python server (which might take awhile for me to afford). There's a thing called ChromeDriver where basically Python can control a Chromium-based browser (such as Chrome or Brave). I can potentially make a code where when a request is made to the server it will login to panel.myownfreehost.net, find the account and suspend it. This might take a LOT of time to do, and it might not even work (I'm not that good with Python).

You can use selenium. It uses the Chromedriver. However, I reccomend to use geckodriver(firefox) as it works better and more stable. For the Server, just buy an 2$ vps, and you can make such code in under 50 lines. So this shouldn't be a problem. For the Server, I would reccomend to use Flask. Its super easy to learn.

On 1/15/2022 at 3:25 PM, smallhost said:

The API is incorrect. It doesn't need the username, it needs the 8 character code that @BastelPichi2 was talking about.

Its actually correct. When InfinityFree is talking about the epiz_xxxxxxxx, they say "Vista Panel Login username".

Link to post
Share on other sites
14 minutes ago, smallhost said:

That sounds possible...the problem is I'd need to code a Python bot to do that or find a way to do it in PHP with cURL. I'd also need to add a user agent header to make it look like its a browser sending the requests because it might not allow automated requests. This will take some time to do...

 

Edit: Here's what I see that the bot needs to do (in this order).

Connecting to the Panel directly is quite hard. (As its terribly coded). For example the username is gotten from the refer information, not just from the form data. As you also have to login, this will make it quite hard. You have to save all coockies, and the php curl has quite a lot of ballast. (I would actually do that in Python)

For the user agent, you dont need that. The panel will accept anything.

Link to post
Share on other sites
7 minutes ago, BastelPichi2 said:

For the Server, just buy an 2$ vps, and you can make such code in under 50 lines. So this shouldn't be a problem. For the Server, I would reccomend to use Flask. Its super easy to learn.

I'm working on making a program to do this in Python, however SmallHost doesn't have any funding to spend on a VPS server. As soon as I set up ads or get a job (whatever comes first), I'll see what I can do in regards to buying a VPS server.

Also, a $2 VPS server is very inexpensive. Are you sure that isn't a monthly charge? Even if it is monthly, that's still cheap. Where did you find that VPS server?

Link to post
Share on other sites
52 minutes ago, smallhost said:

That sounds possible...the problem is I'd need to code a Python bot to do that or find a way to do it in PHP with cURL. I'd also need to add a user agent header to make it look like its a browser sending the requests because it might not allow automated requests. This will take some time to do...

 

Edit: Here's what I see that the bot needs to do (in this order).

(look at your discord)

btw the panel does filter user agents.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...