Jump to content

Editing a file through Java


TheRealMcrafter

Recommended Posts

Been looking around for a while and I cant find anything. Is it possible (without coremods or crazy Java wizardry) to either

 

A) Edit a file in my GitHub repository (on github.com) and save the changes while in a separate thread by using OutputStreamWriter, or

B) Download said file, edit it locally, and re-upload to my GitHub repo, via the aforementioned separate thread?

 

I'm just grasping at straws here, I have no idea if any of this makes sense.

 

Thanks in advance.

 

-TheRealMcrafter

 

Link to comment
Share on other sites

I have some beta testers that are not allowed to share my download link. I shipped my mod with a unique string for each beta tester. I want, for the first time my mod is loaded, to send that string to my file. Then, if I have two of the same strings in my repo file, that person is sharing the link.

Link to comment
Share on other sites

The only way to do this is if your mod commits every change to the file. Problem with that is if two of your beta testers connect and edit the file at the same time, it will cause conflicts, thus resulting in you having to merge those commits...

 

What I'd suggest rather than messing with GitHub is using Pastebin. Create a new user there for your purpose and use the API to create new paste files containing the unique string under that user. Then you can go through each paste and see if there are duplicates of your string.

Here have the documentation of the pastebin API: http://pastebin.com/api

 

But if you really want to use GitHub, then the only way you can programatically edit files in a repo is via GitHub API -> https://developer.github.com/v3/

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

I think you misunderstand. My beta testers cannot commit to my github. They get access to my beta builds, and report problems to my issues page. I dont want them spreading around the download link, so I'd like my mod to communicate with a file in my github repo and tell me if one of my testers is spreading around the link.

 

(Also I need this for future use in my mod)

Link to comment
Share on other sites

Hey man, just an opinion passing by. I've been here for a while and I remember, when I started, that I was all about mod/source security.

I even tried obfuscating source or trimming it from server classes (2nd I still have leftovers).

 

There is just NO POINT in doing it. Seriously. Release beta, if they spread it - what's the big deal?

I mean, there is no real way of providing 100% "safety". Not possible.

 

As to problem - it's really easy if you step outside Java and GitHub.

Get hosting, place php script, set keys in secured file. Make http request/response. Literally 1h of work.

If you really want to key-checking systems like that I don't think GitHub is right place to do it (opinion).

 

... but why? :o

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Hey man, just an opinion passing by. I've been here for a while and I remember, when I started, that I was all about mod/source security.

I even tried obfuscating source or trimming it from server classes (2nd I still have leftovers).

 

There is just NO POINT in doing it. Seriously. Release beta, if they spread it - what's the big deal?

I mean, there is no real way of providing 100% "safety". Not possible.

 

As to problem - it's really easy if you step outside Java and GitHub.

Get hosting, place php script, set keys in secured file. Make http request/response. Literally 1h of work.

If you really want to key-checking systems like that I don't think GitHub is right place to do it (opinion).

 

... but why? :o

 

Honestly, thanks for the opinion. I used to be like that with my source too. I'm not concerned about my source being released, I'm concerned about a tester releasing a ridiculously buggy mod to the public. And in reality, I could just send them unique download links and count downloads on them, but well, I tend to overcomplicate things sometimes. Just wanting to screw around with file sending really.

Link to comment
Share on other sites

And in reality, I could just send them unique download links and count downloads on them.

 

Yes, I was going to suggest something similar (count accesses to a unique page rather than edit files).

 

In terms of github, you said you want to edit files based on the mod's usage but also say you don't want to do a commit. Isn't that pretty much the same thing? I don't know how you'd get git to consider a new file in a repository without committing it.

 

I'm still not sure how you could prevent redistribution, but I guess you're just trying to detect redistribution?

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

I think you misunderstand. My beta testers cannot commit to my github. They get access to my beta builds, and report problems to my issues page. I dont want them spreading around the download link, so I'd like my mod to communicate with a file in my github repo and tell me if one of my testers is spreading around the link.

 

(Also I need this for future use in my mod)

 

That is the point I made: you cannot change a file on github without committing the change! In your case, the only option would be the suggestion I made with Pastebin, or count the DLs on those links like you said.

 

By the way, is the GitHub repo considered a pure issue tracker or is the mod source on it?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Selamat datang di OLXTOTO, situs slot gacor terpanas yang sedang booming di industri perjudian online. Jika Anda mencari pengalaman bermain yang luar biasa, maka OLXTOTO adalah tempat yang tepat untuk Anda. Dapatkan sensasi tidak biasa dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering. Di sini, Anda akan merasakan keseruan yang luar biasa dalam bermain judi slot. DAFTAR OLXTOTO DISINI LOGIN OLXTOTO DISINI AKUN PRO OLXTOTO DISINI   Jackpot Slot Maxwin Sering Untuk Peluang Besar Di OLXTOTO, kami tidak hanya memberikan hadiah slot biasa, tapi juga memberikan kesempatan kepada pemain untuk memenangkan jackpot slot maxwin yang sering. Dengan demikian, Anda dapat meraih keberuntungan besar dan memenangkan ribuan rupiah sebagai hadiah jackpot slot maxwin kami. Jackpot slot maxwin merupakan peluang besar bagi para pemain judi slot untuk meraih keuntungan yang lebih besar. Dalam permainan kami, Anda tidak harus terpaku pada kemenangan biasa saja. Kami hadir dengan jackpot slot maxwin yang sering, sehingga Anda memiliki peluang yang lebih besar untuk meraih kemenangan besar dengan hadiah yang menggiurkan. Dalam permainan judi slot, pengalaman bermain bukan hanya tentang keseruan dan hiburan semata. Kami memahami bahwa para pemain juga menginginkan kesempatan untuk meraih keberuntungan besar. Oleh karena itu, OLXTOTO hadir dengan jackpot slot maxwin yang sering untuk memberikan peluang besar kepada para pemain kami. Peluang Besar Menang Jackpot Slot Maxwin Peluang menang jackpot slot maxwin di OLXTOTO sangatlah besar. Anda tidak perlu khawatir tentang batasan atau pembatasan dalam meraih jackpot tersebut. Kami ingin memberikan kesempatan kepada semua pemain kami untuk merasakan sensasi menang dalam jumlah yang luar biasa. Jackpot slot maxwin kami dibuka untuk semua pemain judi slot di OLXTOTO. Anda memiliki peluang yang sama dengan pemain lainnya untuk memenangkan hadiah jackpot yang besar. Kami percaya bahwa semua orang memiliki kesempatan untuk meraih keberuntungan besar, dan itulah mengapa kami menyediakan jackpot slot maxwin yang sering untuk memenuhi harapan dan keinginan Anda.   Kesimpulan OLXTOTO adalah situs slot gacor terbaik yang memberikan pengalaman bermain judi slot online yang tak terlupakan. Dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering, OLXTOTO menjadi pilihan terbaik bagi para pemain yang mencari kesenangan dan kemenangan besar dalam perjudian online. Di samping itu, OLXTOTO juga menawarkan layanan pelanggan yang ramah dan responsif, siap membantu setiap pemain dalam mengatasi masalah teknis atau pertanyaan seputar perjudian online. Kami menjaga integritas game dan memberikan lingkungan bermain yang adil serta menjalankan kebijakan perlindungan pelanggan yang cermat. Bergabunglah dengan OLXTOTO sekarang dan nikmati pengalaman bermain slot online yang luar biasa. Jadilah bagian dari komunitas perjudian yang mengagumkan ini dan raih kesempatan untuk meraih kemenangan besar. Dapatkan akses mudah dan praktis ke situs OLXTOTO dan rasakan sensasi bermain judi slot yang tak terlupakan.  
    • OLXTOTO: Platform Maxwin dan Gacor Terbesar Sepanjang Masa Di dunia perjudian online yang begitu kompetitif, mencari platform yang dapat memberikan kemenangan maksimal (Maxwin) dan hasil terbaik (Gacor) adalah prioritas bagi para penjudi yang cerdas. Dalam upaya ini, OLXTOTO telah muncul sebagai pemain kunci yang mengubah lanskap perjudian online dengan menawarkan pengalaman tanpa tandingan.     Sejak diluncurkan, OLXTOTO telah menjadi sorotan industri perjudian online. Dikenal sebagai "Platform Maxwin dan Gacor Terbesar Sepanjang Masa", OLXTOTO telah menarik perhatian pemain dari seluruh dunia dengan reputasinya yang solid dan kinerja yang luar biasa. Salah satu fitur utama yang membedakan OLXTOTO dari pesaingnya adalah komitmen mereka untuk memberikan pengalaman berjudi yang unik dan memuaskan. Dengan koleksi game yang luas dan beragam, termasuk togel, slot online, live casino, dan banyak lagi, OLXTOTO menawarkan sesuatu untuk semua orang. Dibangun dengan teknologi terkini dan didukung oleh tim ahli yang berdedikasi, platform ini memastikan bahwa setiap pengalaman berjudi di OLXTOTO tidak hanya menghibur, tetapi juga menguntungkan. Namun, keunggulan OLXTOTO tidak hanya terletak pada permainan yang mereka tawarkan. Mereka juga terkenal karena keamanan dan keadilan yang mereka berikan kepada para pemain mereka. Dengan sistem keamanan tingkat tinggi dan audit rutin yang dilakukan oleh otoritas regulasi independen, para pemain dapat yakin bahwa setiap putaran permainan di OLXTOTO adalah adil dan transparan. Tidak hanya itu, OLXTOTO juga dikenal karena layanan pelanggan yang luar biasa. Dengan tim dukungan yang ramah dan responsif, para pemain dapat yakin bahwa setiap pertanyaan atau masalah mereka akan ditangani dengan cepat dan efisien. Dengan semua fitur dan keunggulan yang ditawarkannya, tidak mengherankan bahwa OLXTOTO telah menjadi platform pilihan bagi para penjudi online yang mencari kemenangan maksimal dan hasil terbaik. Jadi, jika Anda ingin bergabung dengan jutaan pemain yang telah merasakan keajaiban OLXTOTO, jangan ragu untuk mendaftar dan mulai bermain hari ini!  
    • OLXTOTO adalah bandar slot yang terkenal dan terpercaya di Indonesia. Mereka menawarkan berbagai jenis permainan slot yang menarik dan menghibur. Dengan tampilan yang menarik dan grafis yang berkualitas tinggi, pemain akan merasa seperti berada di kasino sungguhan. OLXTOTO juga menyediakan layanan pelanggan yang ramah dan responsif, siap membantu pemain dengan segala pertanyaan atau masalah yang mereka hadapi. Daftar =  https://surkale.me/Olxtotodotcom1
    • DAFTAR & LOGIN BIGO4D   Bigo4D adalah situs slot online yang populer dan menarik perhatian banyak pemain slot di Indonesia. Dengan berbagai game slot yang unik dan menarik, Bigo4D menjadi tempat yang ideal untuk pemula dan pahlawan slot yang berpengalaman. Dalam artikel ini, kami akan membahas tentang Bigo4D sebagai situs slot terbesar dan menarik yang saat ini banyak dijajaki oleh pemain slot online.
    • DAFTAR & LOGIN BIGO4D Bigo4D adalah situs togel online yang menjadi pilihan banyak pemain di Indonesia. Dengan berbagai keunggulan yang dimilikinya, Bigo4D mampu menjadi situs togel terbesar di pasaran saat ini. Dalam artikel ini, kami akan membahas secara lengkap tentang Bigo4d dan alasan-alasannya menjadi situs togel favorit banyak pemain.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.